6. Building a Common Operating Picture12. Adding A Choropleth Data Layer
Feedback

12 - Adding a Choropleth Data Layer

This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.

For your map to be useful in this operational context, you’ll need to load geocoded object data into it. In addition to latitude and longitude for US-based airports, the [Example Data] Airport object type also has as GeoJSON ↗ boundary data that Mapbox can interpret to shape US states on the map (the map widget uses Mapbox ↗ as the primary source for its base map imagery).

In this task, you’ll add a choropleth map layer that reads the GeoJSON and groups our aviation object data by US state.

🔨 Task Instructions

  1. With your map widget selected, in the Widget setup tab, click ⊕ Add Data layer configuration.

  2. Click the item labeled New Data Layer appears just below in the configuration panel. You are now in the configuration space for this data layer.

  3. Apply the following settings in the panel, leaving all others alone:

    • Layer Name: Choropleth
    • Object Set to Map: [o] Airports with Alerts
    • Layer Configurations: Choropleth
    • Region ID Property Type: Mapbox Feature Id v3
    • Mapbox Source Configuration ID: First-level administrative areas (State/Region/Province).

At this point, you should see US states colored by the airport count. Let’s update the coloring basis from a basic object count to an aggregated property.

  1. In the Item block a little further down in the data layer configuration panel, change the Aggregation Type from Count to Sub-aggregation.
  2. Set the Property to Aggregate to Number of Destinations (it should default to a Sum aggregation).
  3. Update the Color Scale value from Yellow maroon to Red light theme.
  4. Near the bottom of the panel, set the output filter variable by clicking into the Select object set filter variable . . . and then on ➕ New object set filter variable. This variable will contain the GeoJSON parameters of the state(s) you select in the map so downstream object sets can be filtered based on your selection.
  5. The field is now populated with a generically named variable (Map Object set selection filter). Click into the field and change the variable name to [f] Map State Selection.
  6. Save and publish.