Skip to main content
{% area_map
    geography="us_states"
    data="state_sales"
    area_id="state_name"
    value="sum(sales)"
    title="Sales by State"
/%}

Examples

US Counties with Formatting

{% area_map
    geography="us_counties"
    data="county_sales"
    area_id="county_name"
    value="sum(sales)"
    value_fmt="usd"
    title="Sales by County"
/%}

Custom Colors

{% area_map
    geography="us_states"
    data="state_sales"
    area_id="state_name"
    value="sum(sales)"
    color_palette=["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#e6550d", "#a63603"]
/%}

Attributes

title
String
Title to display above the map
subtitle
String
Subtitle to display below the title
info
String
Information tooltip text (can only be used with title)
URL to link the info text to (can only be used with info)
Create a custom link title for the info link, placed after the info text (can only be used with info_link)
height
Number
default:"300"
Height of the map in pixels
zoom
Number
default:"3"
Initial zoom level (0-22, where higher is more zoomed in)
zoomable
Boolean
default:"true"
Allow users to zoom in/out on the map
pannable
Boolean
default:"true"
Allow users to pan/drag the map
base_style
String
default:"mono"
Base map style: “mono” for monochrome basemap, “blank” for solid background onlyAllowed values:
  • mono
  • blank
projection
String
default:"flat"
Map projection: “globe” for 3D globe view, “flat” for 2D flat mapAllowed values:
  • globe
  • flat
legend
Boolean
default:"true"
Show legends for map layers
legend_location
String
default:"bottom_right"
Location of the legend within the mapAllowed values:
  • top_left
  • top_right
  • bottom_left
  • bottom_right
width
Number
Set the width of this component (in percent) relative to the page width
data
String
required
Name of the table to query
filters
Array
default:"[]"
Array of filter IDs to apply
geography
String
Pre-provided geography (use this OR geojson_url + geojson_id)Allowed values:
  • us_states
  • us_counties
geojson_url
String
URL to custom GeoJSON file (required if geography not provided)
geojson_id
String
Property name in GeoJSON features to join on (e.g., “NAME” or “GEOID”)
area_id
String
required
Column name in data that matches geo_id (e.g., “state_id”)
value
String
required
Column or expression for coloring the choropleth (e.g., “sum(sales)”)
color_palette
Array of colors for the choropleth gradient
show_unmatched
Boolean
default:"true"
Whether to show areas that do not have matching data
tooltip
Boolean
default:"true"
Show tooltips on hover
name_property
String
GeoJSON property to use for area name in tooltip (defaults to “NAME”)
value_fmt
String
default:"num"
Format for values in tooltip
zoom_threshold
Zoom range [min, max] where this layer is visible (e.g., [0, 8] shows layer from zoom 0 to 8)
where
String
Custom SQL WHERE condition to apply to the query. For date filters, use date_range instead.
having
String
Custom SQL HAVING condition to apply to the query after GROUP BY
limit
Number
Maximum number of rows to return from the query
order
String
Column name(s) with optional direction (e.g. “column_name”, “column_name desc”)
qualify
String
Custom SQL QUALIFY condition to filter windowed results