Examples
US States by Name
US States by Abbreviation
US Counties by State + County
US Counties by FIPS
Custom GeoJSON
Attributes
Name of the table to query
Array of filter IDs to apply
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”.
URL to custom GeoJSON file (use with geojson_id for custom maps)
GeoJSON property to join on. Use a string for single property (e.g., “NAME”) or array for composite key (e.g., [“STATE”, “COUNTY”]).
Column name in data that matches geo_id (e.g., “state_id”)
Column or expression for coloring the choropleth (e.g., “sum(sales)”)
Array of colors for the choropleth gradient
Whether to show areas that do not have matching data
Show tooltips on hover
Array of SQL expressions for additional fields to show in tooltip (e.g., [“category”, “emissions”])
GeoJSON property to use for area name in tooltip (defaults to “NAME”)
Format for values in tooltip. See Value Formatting for available formats.
Zoom range [min, max] where this layer is visible (e.g., [0, 8] shows layer from zoom 0 to 8)
Show legend for this layer
Custom label for the legend (defaults to table name)
Use date_range to filter data for specific time periods. Accepts predefined ranges (e.g., “last 12 months”), dynamic ranges (e.g., “Last 90 days”), custom date ranges (e.g., “2020-01-01 to 2023-03-01”), or partial ranges (e.g., “from 2020-01-01”, “until 2023-03-01”)Example:Attributes:
- 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:
last 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.
Custom SQL WHERE condition to apply to the query. For date filters, use date_range instead.
Custom SQL HAVING condition to apply to the query after GROUP BY
Maximum number of rows to return from the query. Note: When used with tables, limit will disable subtotals to prevent incomplete subtotal rows.
Column name(s) with optional direction (e.g. “column_name”, “column_name desc”)
Custom SQL QUALIFY condition to filter windowed results

