Graph: national county↔district↔legislator authority layer

The first edges in the repo. Every US county now links to the districts it
sits in, weighted by area overlap, and every legislator links to the district
they represent — county → district → representative, traversable.

Data (PostGIS, no Atlas dependency — computed directly from geometry):
- data/county_district_edges.jsonl — 16,328 weighted edges. area_weight =
  ST_Area(ST_Intersection(county, district))/ST_Area(county) over ST_MakeValid
  Census TIGER 2024 geometries, overlaps <0.5% dropped. Uses area-intersection,
  NOT centroid-in-polygon, so urban districts that carve through counties
  (e.g. GA CD-5 / Atlanta across Clayton+DeKalb+Fulton) are captured, not
  silently dropped. Per-county weights sum to ~1.0 per district type.

build.py:
- ~6,896 new district nodes: 435 CD (ACS demographics where available; sparse
  for the 8 states missing from acs_cd) + 4,927 state-house + 1,897 state-senate
  (geometry-only). GEOID/number-keyed, stable.
- county index.md gains a `districts:` block (frontmatter) + a ## Districts
  section (body links, so link-integrity checks them).
- legislators + US House members gain `represents:` pointing at their district
  node; edge stored once on the person, inverse left to the view.
- schemas/jurisdiction: classification enum + chamber/districts fields.

Honest gaps (logged, not hidden): ID + NH have no state-house geometry, so
their house districts get nodes (represents resolves) but no county edges;
CD nodes for acs_cd-missing states are demographically sparse.

Deterministic (byte-identical rebuild); validate.py passes 26,617 records,
link-integrity clean (every district/represents link resolves).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Fabio
2026-07-04 22:28:08 -04:00
parent 6c9990a115
commit 1beeaab2db
18213 changed files with 280514 additions and 3515 deletions
@@ -22,9 +22,153 @@ demographics:
race_native: 7884
hispanic: 99318
bachelors_plus: 661379
districts:
- to: "us/states/mn/districts/03"
rel: in-district
area_weight: 0.7949
- to: "us/states/mn/districts/05"
rel: in-district
area_weight: 0.1974
- to: "us/states/mn/districts/06"
rel: in-district
area_weight: 0.0056
- to: "us/states/mn/districts/senate/37"
rel: in-district
area_weight: 0.2531
- to: "us/states/mn/districts/senate/45"
rel: in-district
area_weight: 0.1702
- to: "us/states/mn/districts/senate/34"
rel: in-district
area_weight: 0.1228
- to: "us/states/mn/districts/senate/49"
rel: in-district
area_weight: 0.0759
- to: "us/states/mn/districts/senate/42"
rel: in-district
area_weight: 0.0605
- to: "us/states/mn/districts/senate/51"
rel: in-district
area_weight: 0.055
- to: "us/states/mn/districts/senate/50"
rel: in-district
area_weight: 0.051
- to: "us/states/mn/districts/senate/43"
rel: in-district
area_weight: 0.0424
- to: "us/states/mn/districts/senate/38"
rel: in-district
area_weight: 0.0353
- to: "us/states/mn/districts/senate/46"
rel: in-district
area_weight: 0.0335
- to: "us/states/mn/districts/senate/63"
rel: in-district
area_weight: 0.023
- to: "us/states/mn/districts/senate/60"
rel: in-district
area_weight: 0.0207
- to: "us/states/mn/districts/senate/61"
rel: in-district
area_weight: 0.02
- to: "us/states/mn/districts/senate/59"
rel: in-district
area_weight: 0.0184
- to: "us/states/mn/districts/senate/62"
rel: in-district
area_weight: 0.0111
- to: "us/states/mn/districts/house/37a"
rel: in-district
area_weight: 0.2139
- to: "us/states/mn/districts/house/45a"
rel: in-district
area_weight: 0.1241
- to: "us/states/mn/districts/house/34a"
rel: in-district
area_weight: 0.0977
- to: "us/states/mn/districts/house/45b"
rel: in-district
area_weight: 0.0461
- to: "us/states/mn/districts/house/49b"
rel: in-district
area_weight: 0.0406
- to: "us/states/mn/districts/house/37b"
rel: in-district
area_weight: 0.0392
- to: "us/states/mn/districts/house/49a"
rel: in-district
area_weight: 0.0353
- to: "us/states/mn/districts/house/42a"
rel: in-district
area_weight: 0.0321
- to: "us/states/mn/districts/house/50b"
rel: in-district
area_weight: 0.0306
- to: "us/states/mn/districts/house/51b"
rel: in-district
area_weight: 0.0294
- to: "us/states/mn/districts/house/42b"
rel: in-district
area_weight: 0.0284
- to: "us/states/mn/districts/house/51a"
rel: in-district
area_weight: 0.0256
- to: "us/states/mn/districts/house/43b"
rel: in-district
area_weight: 0.0253
- to: "us/states/mn/districts/house/34b"
rel: in-district
area_weight: 0.0251
- to: "us/states/mn/districts/house/50a"
rel: in-district
area_weight: 0.0204
- to: "us/states/mn/districts/house/46b"
rel: in-district
area_weight: 0.0191
- to: "us/states/mn/districts/house/38a"
rel: in-district
area_weight: 0.0181
- to: "us/states/mn/districts/house/38b"
rel: in-district
area_weight: 0.0172
- to: "us/states/mn/districts/house/43a"
rel: in-district
area_weight: 0.0171
- to: "us/states/mn/districts/house/60a"
rel: in-district
area_weight: 0.0149
- to: "us/states/mn/districts/house/46a"
rel: in-district
area_weight: 0.0144
- to: "us/states/mn/districts/house/63b"
rel: in-district
area_weight: 0.0125
- to: "us/states/mn/districts/house/61b"
rel: in-district
area_weight: 0.011
- to: "us/states/mn/districts/house/59a"
rel: in-district
area_weight: 0.0106
- to: "us/states/mn/districts/house/63a"
rel: in-district
area_weight: 0.0104
- to: "us/states/mn/districts/house/61a"
rel: in-district
area_weight: 0.009
- to: "us/states/mn/districts/house/59b"
rel: in-district
area_weight: 0.0078
- to: "us/states/mn/districts/house/62b"
rel: in-district
area_weight: 0.0067
- to: "us/states/mn/districts/house/60b"
rel: in-district
area_weight: 0.0058
sources:
- field: demographics
source: Census ACS 2023
source: "Census ACS 2023"
- field: districts
source: "PostGIS area-intersection over Census TIGER 2024 boundaries"
confidence: official
tags: [jurisdiction, county, mn]
timestamp: "2026-07-03"
@@ -56,6 +200,57 @@ County jurisdiction — 4 officeholders mapped.
| Hispanic/Latino | 99318 |
| Bachelor's or higher | 661379 |
## Districts
- [MN-03](/us/states/mn/districts/03.md) — 79% (congressional)
- [MN-05](/us/states/mn/districts/05.md) — 20% (congressional)
- [MN-06](/us/states/mn/districts/06.md) — 1% (congressional)
- [MN Senate District 37](/us/states/mn/districts/senate/37.md) — 25% (state senate)
- [MN Senate District 45](/us/states/mn/districts/senate/45.md) — 17% (state senate)
- [MN Senate District 34](/us/states/mn/districts/senate/34.md) — 12% (state senate)
- [MN Senate District 49](/us/states/mn/districts/senate/49.md) — 8% (state senate)
- [MN Senate District 42](/us/states/mn/districts/senate/42.md) — 6% (state senate)
- [MN Senate District 51](/us/states/mn/districts/senate/51.md) — 6% (state senate)
- [MN Senate District 50](/us/states/mn/districts/senate/50.md) — 5% (state senate)
- [MN Senate District 43](/us/states/mn/districts/senate/43.md) — 4% (state senate)
- [MN Senate District 38](/us/states/mn/districts/senate/38.md) — 4% (state senate)
- [MN Senate District 46](/us/states/mn/districts/senate/46.md) — 3% (state senate)
- [MN Senate District 63](/us/states/mn/districts/senate/63.md) — 2% (state senate)
- [MN Senate District 60](/us/states/mn/districts/senate/60.md) — 2% (state senate)
- [MN Senate District 61](/us/states/mn/districts/senate/61.md) — 2% (state senate)
- [MN Senate District 59](/us/states/mn/districts/senate/59.md) — 2% (state senate)
- [MN Senate District 62](/us/states/mn/districts/senate/62.md) — 1% (state senate)
- [MN House District 37A](/us/states/mn/districts/house/37a.md) — 21% (state house)
- [MN House District 45A](/us/states/mn/districts/house/45a.md) — 12% (state house)
- [MN House District 34A](/us/states/mn/districts/house/34a.md) — 10% (state house)
- [MN House District 45B](/us/states/mn/districts/house/45b.md) — 5% (state house)
- [MN House District 49B](/us/states/mn/districts/house/49b.md) — 4% (state house)
- [MN House District 37B](/us/states/mn/districts/house/37b.md) — 4% (state house)
- [MN House District 49A](/us/states/mn/districts/house/49a.md) — 4% (state house)
- [MN House District 42A](/us/states/mn/districts/house/42a.md) — 3% (state house)
- [MN House District 50B](/us/states/mn/districts/house/50b.md) — 3% (state house)
- [MN House District 51B](/us/states/mn/districts/house/51b.md) — 3% (state house)
- [MN House District 42B](/us/states/mn/districts/house/42b.md) — 3% (state house)
- [MN House District 51A](/us/states/mn/districts/house/51a.md) — 3% (state house)
- [MN House District 43B](/us/states/mn/districts/house/43b.md) — 3% (state house)
- [MN House District 34B](/us/states/mn/districts/house/34b.md) — 3% (state house)
- [MN House District 50A](/us/states/mn/districts/house/50a.md) — 2% (state house)
- [MN House District 46B](/us/states/mn/districts/house/46b.md) — 2% (state house)
- [MN House District 38A](/us/states/mn/districts/house/38a.md) — 2% (state house)
- [MN House District 38B](/us/states/mn/districts/house/38b.md) — 2% (state house)
- [MN House District 43A](/us/states/mn/districts/house/43a.md) — 2% (state house)
- [MN House District 60A](/us/states/mn/districts/house/60a.md) — 1% (state house)
- [MN House District 46A](/us/states/mn/districts/house/46a.md) — 1% (state house)
- [MN House District 63B](/us/states/mn/districts/house/63b.md) — 1% (state house)
- [MN House District 61B](/us/states/mn/districts/house/61b.md) — 1% (state house)
- [MN House District 59A](/us/states/mn/districts/house/59a.md) — 1% (state house)
- [MN House District 63A](/us/states/mn/districts/house/63a.md) — 1% (state house)
- [MN House District 61A](/us/states/mn/districts/house/61a.md) — 1% (state house)
- [MN House District 59B](/us/states/mn/districts/house/59b.md) — 1% (state house)
- [MN House District 62B](/us/states/mn/districts/house/62b.md) — 1% (state house)
- [MN House District 60B](/us/states/mn/districts/house/60b.md) — 1% (state house)
## Source
- demographics: Census ACS 2023
- districts: PostGIS area-intersection over Census TIGER 2024 boundaries