GithubHelp home page GithubHelp logo

missinglink / whosonfirst-properties Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whosonfirst/whosonfirst-properties

0.0 1.0 0.0 491 KB

What things mean in Who's On First documents

License: Other

Makefile 100.00%

whosonfirst-properties's Introduction

whosonfirst-properties

Where things come from in Who's On First.

Click here to see a full list of Who's On First property prefixes.

Adding a new property

  1. Create a new property .json file using the template file.
  2. Fill out all required properties and optional properties, if available.

Properties

While a property .json file in the whosonfirst-properties repository does not require all properties listed below, the more information we are able to gather about a property, the better. When adding a new property, please provide as much current, available information about that specific property as possible.

  • "id": A unique numeric integer identifier, typically derived from Brooklyn Integers (integer, required property).

  • "name": The name of a given property. For example, the qs:name property would be name to represent the "name" property derived from "Quattroshapes" (string, required property). See also Examples below.

  • "prefix": The source that Who's On First derived this property from. For example, the qs:name property prefix would be qs to represent "Quattroshapes". This value is typically two to ten characters in length (string, required property) and must be unique (not shared with another source).

  • "description": A one to two sentence description of the property value (string, optional property).

  • "type": The property value type - string, list, dictionary, float, or integer (string, required property).

  • "items": For properties with a list or dictionary "type", the type of item contained within the list or dictionary (string, optional property).

  • "patterns": A regular expression which can be used to validate the property's name, the property's value or both. The "patterns" property is an object which can contain up to two key/value pairs; patterns.name validates the property's name and patterns.value validates the property's value. See also Examples below.

Examples

wof:country

{
    "id": 1158807947,
    "name": "country",
    "prefix": "wof",
    "description": "A two-letter country code from ISO 3166.",
    "type": "string",
    "patterns": {
        "value": "^[A-Z]{2}$"
    }
}

The wof:country property contains a ISO 3166 country code and the value of this property can be tested/validated against the regular expression in patterns.value.

name:preferred

{
    "id": 1158804557,
    "name": "{lang}_x_preferred",
    "prefix": "name",
    "description": "The preferred name for a place. Used in Pelias and to generate language-specific map labels.",
    "type": "list",
    "items": {
        "type": "string"
    },
    "patterns": {
        "name": "*_x_preferred"
    }
}

Unlike other properties, the name of this property has language code wildcard, denoted by {lang} as part of the full name. The name can be tested and validated by building a regular expression formed from the prefix value and the patterns.name value, as in ^name:*_x_preferred$.

The property value contains a list of one or more string elements.

See also

whosonfirst-properties's People

Contributors

stepps00 avatar vicchi avatar nvkelso avatar zbsingleton avatar thisisaaronland avatar dphiffer avatar botsonfirst avatar straup avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.