Home

Awesome

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.

<img src="docs/assets/es_resize.jpg" width="300">

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

<img src="docs/assets/cl_resize.jpg" width="300">

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)

<!--[BR municipality list (IBGE codes)](https://github.com/hyperknot/country-levels-export/blob/master/docs/br_muni_list.md)-->

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:

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)

<!--[BR municipality list (IBGE codes)](https://github.com/hyperknot/country-levels-export/blob/master/docs/br_muni_list.md)-->