Examples
US States by Name
US States by Abbreviation
US Counties by State + County
US Counties by FIPS
Custom GeoJSON
Diverging Scale Centered at 0
Data Labels
Custom Breakpoints
Attributes
Pre-provided geography (use this OR geojson_url + geojson_id)Allowed values:
us_statesus_counties
How to match areas. For us_states: “name”, “abbr”, or “fips”. For us_counties: “state-county” or “fips”.
GeoJSON property to join on. Use a string for single property (e.g., “NAME”) or array for composite key (e.g., [“STATE”, “COUNTY”]).
Array of colors for the choropleth gradient. A single-color array auto-expands to [background, color].
Lower bound for the color scale. Values below this clamp to the first color in the scale. Defaults to the minimum value in the data.
Upper bound for the color scale. Values above this clamp to the last color in the scale. Defaults to the maximum value in the data.
Anchor a specific value (typically 0) at the middle of a diverging color scale. Requires a color_scale with 3 or more colors.
Pin specific data values to specific colors, interpolating between them. Provide an array of value and color pairs. Values beyond the first and last breakpoint are clamped to the end colors. Takes precedence over color_scale, min, max, and midpoint.
Array of SQL expressions for additional fields to show in tooltip (e.g., [“category”, “emissions”])
Format for values in tooltip. See Value Formatting for available formats.
Label each area with its value, centered in the area. Set to to show labels with the default style.Example:Attributes:
- fmt:
string- Format the label value. Defaults to value_fmt.- Allowed values: See Value Formatting for all available formats.
- size:
number- Font size in px - rotate:
number- Rotate each label (degrees) - color:
string- Change the text color of the labels - border_color:
string- Change the border color surrounding text labels. Defaults to white in light mode and black in dark mode. - show_overlap:
boolean- Show labels for every area even when they overlap
Filter data to a time period. Attributes:
date_range is an OBJECT with range (the period) and optionally date (which column to filter on when the table has more than one). Shape: date_range={ range="last 12 months" date="order_date" }. range accepts predefined values (last 7 days, month to date), dynamic patterns (Last 90 days), custom windows (2020-01-01 to 2023-03-01), or partial ranges (from 2020-01-01, until 2023-03-01). Pass a plain string for range — the whole object is NOT a string.Example:- range:
string- Time period to filter. Use presets like ‘last 7 days’, dynamic patterns like ‘Last 90 days’, custom ranges like ‘2020-01-01 to 2023-03-01’, or partial ranges like ‘from 2020-01-01’.- Allowed values:
todayyesterdaylast 7 dayslast 30 dayslast 3 monthslast 6 monthslast 12 monthsprevious weekprevious monthprevious quarterprevious yearthis weekthis monththis quarterthis yearnext weeknext monthnext quarternext yearweek to datemonth to datequarter to dateyear to dateall time
- Allowed values:
- date:
string- Date column to filter on. Required when the data has multiple date columns.
Maximum number of rows to return from the query. Note: When used with tables, limit will disable subtotals to prevent incomplete subtotal rows.

