Data.
Every page on Akashic — county, state, congressional district, state legislative district, metro area, media market — is backed by a stable JSON file at a stable URL. Free to read, no API key, permissively licensed (CC BY 4.0), deterministically regenerated on every build, hashed and archived back to first-source releases.
Endpoints
One file per geography. The geo_id segment is the same identifier used in the URL of that geography’s human-readable page on this site (the county FIPS, the state postal abbreviation, the CBSA code, etc.) so any link can be translated by hand.
| URL pattern | Geography | Count | Example |
|---|---|---|---|
/data/per_county/{fips}.json | US counties (5-digit FIPS). Includes DC and the 9 Connecticut planning regions (CT abandoned counties for ACS reporting in the 2022 5-year release). | 3,143 | /data/per_county/10003.jsonNew Castle County, Delaware |
/data/per_state/{fips}.json | 50 states + DC. Aggregated population-weighted from the constituent counties at ETL time. | 51 | /data/per_state/IL.jsonIllinois |
/data/per_cd/{geoid}.json | Congressional districts (120th Congress). | 435 | /data/per_cd/1701.jsonIllinois 1st Congressional District |
/data/per_sld_upper/{geoid}.json | State legislative districts (upper chamber — typically called the state senate). | ~1,900 | /data/per_sld_upper/17-1.jsonIllinois Senate District 1 |
/data/per_sld_lower/{geoid}.json | State legislative districts (lower chamber — typically called the state house). Largest single tier; ships to its own Pages project to stay under the 20k-file deploy cap. | ~4,700 | /data/per_sld_lower/17-1.jsonIllinois House District 1 |
/data/per_cbsa/{cbsa}.json | Core-based statistical areas (Census Bureau metropolitan + micropolitan statistical areas). | ~920 | /data/per_cbsa/16980.jsonChicago-Naperville-Elgin Metro Area |
/data/per_dma/{id}.json | Nielsen Designated Market Areas (TV markets). | ~210 | /data/per_dma/602.jsonChicago DMA |
On-demand (Worker-served)
The static set above covers the seven page tiers Akashic generates as standalone pages. For the long tail of US census places (incorporated_place, cdp,town, etc. — ~31,000 entities) and for user-defined canvas polygons, a Cloudflare Worker at place.akashic.app/place/{geo_id} renders on demand and caches at the edge for 24 hours. The same JSON shape comes back as a Worker response if you request Accept: application/json; otherwise an HTML place page is returned.
Schema
One JSON file per place. All seven tiers share a common envelope (geo_type, name, parent geography fields, elections, demographics,typology, similar_* rows, narrative, source citations); tier-specific fields layer in on top (a county has seat and hero_image; a CBSA has constituent_counties; a CD has representative and allocation_factor).
The canonical TypeScript shape lives at lib/types.ts in the repo; the runtime guarantee is the Zod schema in the same file. A representative sample, from /data/per_county/10003.json (New Castle County, Delaware), trimmed for length:
{
"fips": "10003",
"geo_type": "county",
"name": "New Castle County",
"state": "Delaware",
"state_abbr": "DE",
"region": "the Mid-Atlantic",
"wikipedia_title": "New_Castle_County,_Delaware",
"geography": {
"area_sq_mi": 426.3,
"centroid": { "lat": 39.578, "lng": -75.639 }
},
"elections": [
{ "year": 1876, "dem": null, "rep": null, "other": null,
"total": null, "margin": null, "winner": "N" },
{ "year": 1908, "dem": 12964, "rep": 14979, "other": 701,
"total": 28644, "margin": -0.0703, "winner": "R" },
{ "year": 2024, "dem": 180568, "rep": 90768, "other": 3824,
"total": 275160, "margin": 0.3264, "winner": "D" }
],
"typology": "diversifying_metro",
"similar_counties": [
{ "fips": "26065", "name": "Ingham County", "state": "Michigan",
"state_abbr": "MI", "similarity": 1.0 }
],
"demographics": {
"totalPopulation": 577961,
"medianHouseholdIncome": 84800,
"races": [ ... ],
"age": [ ... ],
"education": { ... }
},
"sources": {
"elections_through": 2024,
"acs_release": "2024 5-year",
"religion_census": "2020"
}
}Field reference
geo_type- One of
county,state,cd,sld_upper,sld_lower,cbsa,dma,place. Identifies which envelope you’re reading. elections[*].margin- D-vs-R partisan margin:
(dem − rep) / total. A decimal in[−1.0, +1.0], positive for Democratic, negative for Republican. Drives the sparkline, similarity vectors, and narrative prose. elections[*].winner- True plurality winner among D / R / O. Differs from
marginin strong third-party years: 1892 Populist counties, 1912 Bull Moose, 1924 La Follette, 1948 Dixiecrat, 1968 Wallace. typology- One of 13 cluster labels —
new_american,florida_surge,black_belt,heartland_swing,appalachian_realigners,evangelical_south,texan_right,industrial_catholic,sunbelt_conservative,diversifying_metro,farm_belt,stable_rural_right,realigning_suburb. Built by unsupervised clustering over seven feature families; see methodology. similar_counties[*].similarity- Cosine similarity of the last-10-elections margin vector.
1.0means an identical voting trajectory; values above0.95are typically near-identical trajectories within the same era. sources- As-of dates for each upstream feed.
elections_throughis the most recent presidential cycle included;acs_releaseis the 5-year ACS vintage;religion_censusis the Association of Statisticians of American Religious Bodies release.
Bulk archives
Per-place JSON is convenient for one-off lookups; for analysis at scale, use the bulk archives. Each archive is a single gzipped file, deterministically built from the same source, with a version-stamped filename so a citation never points at a moving target.
/data/exports/v2026.05/akashic-elections-2024.csv.gz— every county × every year × D/R/O/total, long format. One row per (fips, year)./data/exports/v2026.05/akashic-demographics-2024-acs.csv.gz— wide-format ACS variables per county. Education, income, age, race, language, household composition./data/exports/v2026.05/akashic-typology.csv— county FIPS, typology, similarity-vector neighbors.
Each release builds via npm run data:csv. The version segment is v{year}.{month}; older versions stay available indefinitely.
License + citation
Akashic’s original content (the narrative prose, the typology assignment output, the headline templates, the similarity vectors) is licensed CC BY 4.0. Upstream sources keep their own licenses, listed in ATTRIBUTION.txt.
Every place page renders a Cite this page widget in APA / MLA / Chicago / BibTeX. For dataset citations:
Akashic (2026). akashic-elections-2024 [Data set].
https://akashic.app/data/exports/v2026.05/
akashic-elections-2024.csv.gzStability + freshness
- URLs are permanent. A page that resolves today resolves on every future build. Geographies don’t get removed when they redistrict; they get a
valid_throughstamp and a successor link. - Schema is additive. New fields can appear in a build; existing fields don’t change meaning or get removed. Field renames go through a one-cycle deprecation window with both old and new fields populated.
- Freshness lives at /api/data-freshness. Source-by-source as-of dates, regenerated on every build.
- Versioned bulk archives are immutable. Reproducing a paper’s figures in 2030 against the
v2026.05archive returns the same numbers it did in 2026.
Conventions
- FIPS code padding. County FIPS are always 5 digits, state FIPS always 2 digits, padded with leading zeros.
01001not1001. - Null vs zero. A missing value is
null; a measured zero is0. Pre-1928 election rows are mostlynullbecause the underlying source (MIT Election Lab) doesn’t cover earlier cycles. - Hispanic ethnicity overlaps race. Race shares plus Hispanic/Latino can exceed 100% in heavily Hispanic counties — Hispanic is an ACS ethnicity, not a separate race. See methodology.