Skip to content

Shared Political Geography

jamesturk edited this page Mar 21, 2013 · 24 revisions

Principles

  • IDs should be somewhat predictable and globally unique.
  • Geographic IDs should not be dependent upon temporal changes to geographies.
  • IDs should not attempt to capture the full hierarchy of all entities, but enough to be uniquely descriptive. (e.g. If there are school districts at the county and city level, county & city are important disambiguators and should be included in the identifier)

ID Format

IDs are in the format <prefix>:country-<country_code>[:<type>-<type_id>]+

prefix

One proposed prefix is ocd:location (with the understanding that other id formats will use ocd:person, ocd:organization, etc.)

country_code

ISO-3166-1 code for country

type

A type of boundary (e.g. 'country', 'state', 'town', 'city', 'cd', 'sldl', 'sldu') As work progresses a list of possible types will be curated, but type is mostly open-ended.

type_id

A unique identifier for the entity at this level.

If alphanumeric should be converted to lower case, with spaces and special characters converted to underscores.

If numeric no leading zeros are allowed.


Assignment

  • Whenever possible, all geographic ids of a given type should be defined at a same time, for example all state geographies should be defined up front. Similarly, all cities within North Carolina should be defined at once to avoid accidentally choosing a conflicting name.
  • Every attempt should be made not to grow the set of types unnecessarily. A list of existing types should be published and new ids not using one of the defined types should be appropriately justified.

Examples

  • United States
    • ocd:location:country-us
  • North Carolina
    • ocd:location:country-us:state-nc
  • North Carolina 2nd Congressional District
    • ocd:location:country-us:state-nc:cd-2
  • North Carolina State Lower Legislative District 1
    • ocd:location:country-us:state-nc:sldl-1
  • Wake County, North Carolina
    • ocd:location:country-us:state-nc:county-wake
  • Cary, North Carolina (note that despite being within Wake County this is not indicated due to not being an identifying feature)
    • ocd:location:country-us:state-nc:town-cary
  • Kildare Farms Homeowners Association, Cary, North Carolina
    • ocd:location:country-us:state-nc:town-cary:hoa-kildarefarms
  • Washington DC, Ward 8
    • ocd:location:country-us:district-dc:ward-8
  • Washington DC, ANC 4A
    • ocd:location:country-us:district-dc:anc-4a
  • Washington DC, ANC 4A, section 08 note: this is a strict subset of the ANC for purposes of representation
    • ocd:location:country-us:district-dc:anc-4a:section-8
Clone this wiki locally