Sample workflow

A typical workflow for a business intelligence application is:

  1. You have a data source containing information that is associated with one or more geographic attributes. For example, demographics associated with county names, or sales data associated with postal codes.
  2. You make a query from the application data store to get the data points you are interested in, as well as an appropriate geographic attribute. Additionally aggregate those results to the geographic level you are interested in if necessary, for example grouping individual sales to sum total sales per postal code or county.
  3. Join your query results to Mapbox Boundaries feature IDs using metadata in the feature lookup table. Joining to standardized codes such as postal, FIPS, or NUTS codes (available in the unit_code metadata property) is the most straightforward option. Joining by name may require some normalization of your data or a tolerance for alternate spellings.
  4. Aggregate your data based on the joined feature IDs. For example, sum individual sales data grouped by the feature IDs of the Mapbox Boundaries postal codes.
  5. Generate a Mapbox GL layer from the Mapbox Style Specification to create a visual from query results.
  6. The visual style definition works the same across all Mapbox GL products, including Mapbox GL JS on the web, and Mapbox GL Native on iOS, Android, and macOS.


Read the Visualize the USA’s economic recovery with client-side data joins blog post, which illustrates how the steps in the sample workflow can work in your application.