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.
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.
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
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.
The land polygons are from Wambacher's OSM Admin Boundaries Map.
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:
-
Get a CLI key from OSM Admin Boundaries Map and replace
__CLI__KEY__
incountry_levels_lib/wam_download.py
. -
run
source prepare_virtualenv.sh
-
run
./process_all.sh
If you have direnv installed, the virtualenv will activate/deactivate automatically upon entering/exiting this project.