Skip to content

add administrative division support #4

@alistaire47

Description

@alistaire47

It would be nice to add administrative division support, including names in as many languages as possible (start with UN-official?) and codes where possible (at least ISO 3166-2), in parallel with as_country_code, as_country_name, and parse_country, maybe with as_division_code etc. ("state" is country-specific). parse_division (or whatever it's called) should probably take a country parameter to limit result scope.

Code can be recycled and refactored to be multi-purpose, but new data will have to be assembled. ISO 3166-2 codes are easy enough to grab, but I don't think CLDR yet has administrative divisions, so non-English names may be hard.

Going beyond principal subdivisions (e.g. not just U.S. states, but down to counties/parishes) seems unlikely unless a spectacular data source appears. AFAIK most (all?) codes for them are country-specific (e.g. FIPS), so aggregating data would be a pain. Machine translation of names is possible, if it's useful.

  • Aggregate data
  • Build conversion functions
  • Build parsing function
  • Add way to mutate from division to country without geocoding
  • Build attribute function (capitals, at least)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions