MapTiler Countries is a dataset that primarily contains data about administrative divisions of a world based on countries and their territories. The dataset is designed to be used as an interactive choropleth map to make nice cartographic visualizations easily. If you are searching just for the land polygon, see the MapTiler Land dataset.
Before you scroll down, please read these 2 articles:
Schema documentation
The dataset in MapTiler Cloud
Structure
According to the schema, there are two main layers as polygons:
administrative - contains levels of countries and their divisions
postal - contains zipcode areas - now only available in the US
How to use and filter data for MapTiler Countries
-
Add source countries from MapTiler Cloud to your map in MapTiler Editor.
-
Add a layer and name in your language it for example “US_states”.
-
Then you can filter it by level.
The level represents divisions in the whole country. Level with value 0 (as number) is a country, levels 1, 2, 3 are divisions, subdivisions, and sub-subdivisions. The dataset now contains divisions only for the US, if you need other country`s divisions, please contact us.
Example of style filtered to colored US states
... { "id": "US_states", "type": "fill", "paint": { "fill-color": [ "match", ["get", "name"], ["Nebraska", "Alaska", "Washington", "Nevada", "New Mexico", "Montana", "Minnesota", "Louisiana", "North Carolina", "Kentucky", "Massachusetts", "Delaware", "Michigan"], "#D5CD85", ["Oklahoma", "Florida", "Idaho", "Wisconsin", "Arizona", "Tennessee", "Pennsylvania", "New Hampshire", "Rhode Island"], "#D58785", ["New York", "California", "Wyoming", "Kansas", "Illinois", "Mississippi", "South Carolina", "West Virginia"], "#735F91", ["Texas", "Georgia", "Utah", "Missouri", "South Dakota", "Ohio", "Maryland", "Vermont"], "#567986", ["Colorado", "Oregon", "Alabama", "Indiana", "North Dakota", "Iowa", "Arkansas", "Virginia", "New Jersey", "Maine", "Connecticut"], "#69A86D", "rgba(0, 0, 0, 0.5)" ], "fill-outline-color": "rgba(125, 101, 101, 1)" }, "filter": [ "all", ["==", "level", 1], ["==", "level_0", "US"] ], "source": "countries", "source-layer": "administrative" } ...
Attribution
The dataset requires only (c) MapTiler attribution with the link. There is a possibility to purchase attribution exemption or get data for self-hosting. If you need it for your use case, please contact us.
Useful links
How to add own data to MapTiler Countries to make a choropleth map
Choropleth map with GeoJSON
Comments
0 comments
Please sign in to leave a comment.