Mapbox Countries v1
This tileset reference document includes information to help you use the data in the Mapbox Countries v1 tileset.
Overview
Mapbox Countries v1 is a free, Mapbox-provided vector tileset of high resolution country polygons derived from the Mapbox Boundaries product. Any Mapbox user can use the tileset for use cases like creating country masks or choropleth data visualizations.
The tileset includes vector polygon features for all countries and territories defined in the ISO 3166-1 country code standard, including alternate worldviews for flexibility in how claimed international boundaries are displayed for a regional audience.
Data sources
Data in the Mapbox Countries tileset is based on information obtained from officially recognized local or international entities.
Layer reference
This tileset contains one layer with polygon features and metadata.
country_boundaries
This layer contains the boundary polygons representing all countries and territories with a unique ISO 3166-1 code.
Territory type | Feature count |
---|---|
Countries disputed='false' | 251 |
Disputed areas disputed='true' | 41 |
These polygons complement the mapbox-streets-v8
tileset, which contains associated land and maritime boundary lines and point labels for each country.
feature id
number
The integer feature ID is the integer primary key for each feature and corresponds to the Mapbox Boundaries v3 IDs.
mapbox_id
text
The globally unique Mapbox ID is the alphanumeric primary key for each feature and corresponds to the Mapbox Boundaries v4 IDs.
disputed
text
Countries recognized in the ISO 3166-1 standard have a value of 'false'
while overlay polygons of disputed areas have a value of 'true'
.
We suggest styling disputed boundary polygons with disputed='true'
as a separate style layer. Use a fill-opacity value to make it semi transparent or otherwise distinct style from non-disputed areas.
This example GL filter expression can be used to only display country polygons without any disputed areas:
[
"==",
["get", "disputed"],
"false"
]
worldview
text
The vector tiles contain multiple versions of some boundaries, each with a worldview
value indicating the intended audience. It is important to apply a worldview filter to all your style layers to avoid showing conflicting and overlapping boundaries.
This example GL filter expression builds on the disputed area expression to display all disputed='false'
country boundaries matching a worldview for either US
or all
audiences:
[
"all",
[
"==",
["get", "disputed"],
"false"
],
[
"any",
[
"==",
"all",
["get", "worldview"]
],
[
"in",
"US",
["get", "worldview"]
]
]
]
Refer to the Mapbox Boundaries worldview documentation for available worldviews.
iso_3166_1
text
The iso_3166_1
property contains the ISO 3166-1 (Alpha-2 code) code of the boundary. These match the 249 officially assigned country codes in the ISO 3166-1 standard and the following two unofficial codes:
XK
KosovoXS
Sovereign Base Areas (Akrotiri and Dhekelia)
For disputed area polygons with disputed='true'
, the code is in the D0<ISO><ISO><Number>
format, which indicates the iso_3166_1
code of the two or more countries involved in the disputed claim.
iso_3166_1_alpha_3
text
The associated ISO 3166-1 (Alpha-3 code) as per ISO 3166 except for:
XKS
KosovoXSB
Sovereign Base Areas (Akrotiri and Dhekelia)- Not available for disputed areas
wikidata_id
text
The unique QID of the associated country in the Wikidata Database. This can be used to query the associated Wikidata item for translated country names and various other open data attributes.
name
text
The local name for the country. Countries with multiple local languages may have local names separated by a hyphen.
name_en
text
The commonly used English name for the country.
For displaying map labels, it is recommended to use the point labels available in the place_label
layer of the mapbox-streets-v8
tileset.
region
text
Region name for the country as defined in the UN M49 standard.
subregion
text
Sub-region name for the country as defined in the UN M49 standard.
color_group
number
A number between 1-6 assigned so that no adjacent countries have the same number. This can be used in an expression for creating a standard multi-color world political map.