All Projects → hyperknot → country-levels

hyperknot / country-levels

Licence: MIT license
Full planet GeoJSON extracts, based on ISO and FIPS codes.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Country Levels

Country Levels project contains full planet GeoJSON extracts, based on ISO and FIPS codes.

International data is based on OpenStreetMap and Wikidata. US data is from on US Census Bureau.

Both include up-to-date population numbers.

ISO country code list

ISO1 is referring to ISO 3166-1 country codes, for example ES for Spain.

ISO2 is referring to ISO 3166-2 country codes, for example ES-CL for Castilla y León, Spain.

GeoJSON files are served in different quality levels, q5 refers to smallest, q7 to medium and q8 to higher quality extracts.

You can download the full planet dataset in ZIP in the releases tab.

GeoJSON files and JSON catalogs are also browsable in the export repo.

ISO country code list

US county list (FIPS codes)

Country Level IDs

Country level IDs are optional and are included with each GeoJSON. They simply concatenate the level + the ISO code with :

For example:

  • Spain is iso1:ES
  • Castilla y León is iso2:ES-CL
  • Santa Clara County, CA is fips:06085

License

The source code of this project is licensed under the MIT License.

The GeoJSON files are from OpenStreetMap, © OpenStreetMap contributors.

Population information and corrections are from Wikidata, Public Domain Creative Commons CC0 License.

The US County shapes and FIPS codes are from the US Census Bureau.

Brazilian municipality data and IBGE codes are from IBGE - Brazilian Institute of Geography and Statistics.

The map screenshots in this readme © Mapbox © OpenStreetMap.

Thanks

The land polygons are from Wambacher's OSM Admin Boundaries Map.

Development

If you would like to develop or contribute, you'll need Python 3.7+ and Node with yarn.

Note: this process will start a slow and delayed download from the OSM Admin map. It will take many hours, to make sure we are not overloading the server.

Steps:

  1. Get a CLI key from OSM Admin Boundaries Map and replace __CLI__KEY__ in country_levels_lib/wam_download.py.

  2. run source prepare_virtualenv.sh

  3. run ./process_all.sh

If you have direnv installed, the virtualenv will activate/deactivate automatically upon entering/exiting this project.

Lists

ISO country code list

US county list (FIPS codes)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].