Creating choropleth interactive maps

In an Interactive Map visual, CDP Data Visualization enables you to create choropleth maps. A choropleth map shows geographical areas that are shaded in proportion to the value of the measurement that is displayed on the map.

To create a choropleth map, for each visual, you must specify the following:

  • Custom mapbox style, which has a choropleth shape file in it. See Adding a custom mapbox style.
  • Layer ID, which is the name of a unique layer within the Custom Mapbox style that identifies the shapes that you would like to color by a measure in your data. See Specifying a choropleth layeer ID.
  • Geo-type as Shape ID: The Arcadia dataset must have at least one field in the Geo shelf to determine the location on the map. You must change the Geo-type to Shape ID. A Shape ID is a key that joins the shapes in the Custom mapbox style and the field in the Arcadia dataset. This helps in identifying the measure that maps to the shape. This Geo field must be in the dataset that was used to create the custom mapbox style.

Let's create a choropleth map that colors the average tax liability in California by zip code.

In our example, the choropleth interactive map visual is based on the dataset Personal Income Tax Statistics by Zip Code. For an overview of shelves that specify this visual, see Shelves for interactive maps.

  1. Create an Interactive Map visual; see Basic interactive maps.
  2. Populate the shelves from the available fields in Dimensions and Measures in the Data menu.

    Note that to create a choropleth map, the dataset must have at least one field in the Geo shelf with Geo-type Shape ID.

    1. Select zip_code field and drag it over the Geo shelf to identify the shapes by zip code.

      Cast this to the appropriate Geo Type: click the field on the shelf, and in the Field Properties menu, select Change Type, and select Shape ID. This helps in identifying the measure that maps to the shape.

      Selecting the 'Shape ID' Geo Type for Geo field 'zip_code'
    2. Under Measures, select the avg(total_tax_liability) field, and drag it over the Colors shelf.

      Change the aggregation from total_tax_liability, by selecting Aggregates Average

      This colors the average tax liability in California by zip code.

  3. Navigate to the Map Style menu under Settings, and enter a Custom mapbox style that you have obtained from Mapbox. Make sure that this style has a choropleth shape file in it.
    Specifying a Custom Mapbox style
  4. Navigate to the Choropleth menu under Settings, and enter a Layer ID. Choropleth Layer ID identifies the shapes that you would like to color by a measure in your data..
    Specifying a Choropleth Layer ID
  5. Click Refresh Visual.
  6. The choropleth map visual appears.

    If the visual does not display a choropleth map, check that the Geo-type of the zip_code field is set to Shape ID.

    Displaying a choropleth interactive map visual

Proceed to Customizing the choropleth map.