┌──────────────┬──────────┐
│ source │ rows │
│ varchar │ int64 │
├──────────────┼──────────┤
│ ACS │ 1928304 │
│ AHRF │ 64700 │
│ AIRTOXSCREEN │ 587592 │
│ EJSCREEN │ 1110148 │
│ EPA_RADON │ 3139 │
│ FARA │ 2295140 │
│ HPSA │ 16468 │
│ NIS_TEEN │ 7192 │
│ PLACES │ 3517468 │
│ RUCA │ 319060 │
│ RUCC │ 3235 │
│ SCP │ 16903824 │
│ SDWIS │ 16420 │
│ SVI │ 2784812 │
└──────────────┴──────────┘
14 rows 2 columns
DuckDB CLI
No install beyond the duckdb binary itself — no Python, no R, no account.
Attach and query
duckdb -c "
ATTACH 'https://basemap.cancerdatasci.org/data/latest/cancerbasemap.duckdb' AS cbm (READ_ONLY);
SELECT source, count(*) AS rows FROM cbm.measure.observation GROUP BY source ORDER BY source;
"This page’s own output is the real thing — run at build time, through the actual duckdb binary, not typed in by hand:
Drop -c "..." for an interactive shell (duckdb), then paste the ATTACH once per session and query freely — cbm stays attached for the rest of that shell. Replace latest with a dated folder such as v2026-11-02 to pin a release.
Piping to a file works the same as any other DuckDB output:
duckdb -c "ATTACH 'https://basemap.cancerdatasci.org/data/latest/cancerbasemap.duckdb' AS cbm (READ_ONLY); COPY (SELECT * FROM cbm.measure.definition) TO 'measures.csv';"Every release also ships a views.sql (the same views, created in your own session) and plain Parquet files. .read cannot open a URL, so download it first:
curl -sO https://basemap.cancerdatasci.org/data/latest/views.sql
duckdb -c ".read views.sql" -c "SELECT count(*) FROM geography.unit"