Create a choropleth map

About this style

  • Tileset from custom data: The data that is used as the source for the state-data layer 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.
  • Layers tab: This example uses a custom layer added and styled in the Layers tab.
  • Styling with expressions: The state-data layer 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 density.

Looking for more guidance? Read our Make a choropleth map, part 1: create a style tutorial.

Was this page helpful?