MapTiler Countries dataset

MapTiler Countries is a dataset that primarily contains data about administrative divisions of the world based on countries and their territories. The dataset is designed to be used as an interactive choropleth map to make beautiful cartographic visualizations easily. If you are searching for the land polygon only, see the MapTiler Land dataset.

Before you scroll down, please read these 2 articles:

Schema documentation
The dataset in MapTiler Cloud

Screenshot_2023-04-24_at_12.14.59.png

Structure

According to the schema, there are two main layers as polygons:

administrative - contains levels of countries and their divisions

postal - contains zip code areas - now only available in the US

How to use and filter data for MapTiler Countries

  1. Add the data source countries from MapTiler Cloud to your map in the MapTiler Editor.
  2. Add a layer and name it in your language, for example, “US_states”.
  3. Now you can filter it by level.

The level represents divisions in the whole country. The level with the value 0 (as a number) is a country, and levels 1, 2, and 3 are divisions, subdivisions, and sub-subdivisions of the countries. The dataset currently contains countries and divisions; along with subdivisions for Europe and the USA. If you need more subdivisions and sub-subdivisions, 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.

How to add own data to MapTiler Countries to make a choropleth map
Choropleth map with GeoJSON