Create a choropleth map
- Tileset from custom data: The data that is used as the
state-datalayer comes from a custom tileset that was created by uploading a GeoJSON file to Mapbox Studio. This data is borrowed from the Leaflet choropleth tutorial and contains data on population density across US states. The tileset itself contains the geometry for each state and two properties:
name(a string) and
density(a number). Read more about uploading data to Mapbox Studio in the Overview section.
- Styling with expressions: The
state-datalayer is styled using property expressions. In this case, property expressions are being used on the Color property to style features across a data range. The color of each feature will be determined based on its
Was this page helpful?