Cities: exact GEOID placement from Atlas backfill

Atlas resolved every existing municipal officeholder to its Census place
GEOID at the source (PostGIS). build.py now prefers that exact geoid over
the name-based fuzzy resolver, so filled cities land on their node exactly
rather than by 98.8% name match. Resolved 2,217 -> 2,224; dedup against the
skeleton tightened (a few fuzzy mismatches now collapse correctly).

Note: this is the GEOID *backfill*, not the *fill* — zero net-new
officeholders; the 17,286 empty skeleton cities remain empty. Nationwide
municipal officeholder acquisition is a separate, per-state source problem.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Fabio
2026-07-06 12:03:18 -04:00
parent ec6107a081
commit 3d8b65299f
12 changed files with 4044 additions and 84 deletions
@@ -1,20 +1,25 @@
---
type: Jurisdiction
title: "Pecos, TX"
title: "Town of Pecos, TX"
classification: city
geoid: "4873493"
state: "TX"
counties: ["Reeves"]
sources:
- field: government
source: "Atlas officeholders v3 (2026-07-04)"
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, tx]
timestamp: "2026-07-03"
---
# Pecos, TX
# Town of Pecos, TX
City government — 1 officeholder mapped.
## Source
- government: Atlas officeholders v3 (2026-07-04)
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,20 +1,25 @@
---
type: Jurisdiction
title: "West Falls Church, VA"
title: "Falls Church, VA"
classification: city
geoid: "5127200"
state: "VA"
counties: ["Falls Church"]
sources:
- field: government
source: "Atlas officeholders v3 (2026-07-04)"
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, va]
timestamp: "2026-07-03"
---
# West Falls Church, VA
# Falls Church, VA
City government — 1 officeholder mapped.
## Source
- government: Atlas officeholders v3 (2026-07-04)
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,22 +0,0 @@
---
type: Jurisdiction
title: "Falls Church, VA"
classification: city
geoid: "5127200"
state: "VA"
counties: ["Falls Church"]
sources:
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, va]
timestamp: "2026-07-03"
---
# Falls Church, VA
City — no officeholders mirrored yet.
## Source
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,22 +0,0 @@
---
type: Jurisdiction
title: "Lexington, VA"
classification: city
geoid: "5145512"
state: "VA"
counties: ["Lexington"]
sources:
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, va]
timestamp: "2026-07-03"
---
# Lexington, VA
City — no officeholders mirrored yet.
## Source
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,20 +1,25 @@
---
type: Jurisdiction
title: "East Lexington, VA"
title: "Lexington, VA"
classification: city
geoid: "5145512"
state: "VA"
counties: ["Lexington"]
sources:
- field: government
source: "Atlas officeholders v3 (2026-07-04)"
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, va]
timestamp: "2026-07-03"
---
# East Lexington, VA
# Lexington, VA
City government — 1 officeholder mapped.
## Source
- government: Atlas officeholders v3 (2026-07-04)
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,22 +0,0 @@
---
type: Jurisdiction
title: "Virginia Beach, VA"
classification: city
geoid: "5182000"
state: "VA"
counties: ["Virginia Beach"]
sources:
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, va]
timestamp: "2026-07-03"
---
# Virginia Beach, VA
City — no officeholders mirrored yet.
## Source
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,20 +1,25 @@
---
type: Jurisdiction
title: "The University of Virginia's College at Wise, VA"
title: "Virginia Beach, VA"
classification: city
geoid: "5182000"
state: "VA"
counties: ["Virginia Beach"]
sources:
- field: government
source: "Atlas officeholders v3 (2026-07-04)"
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, va]
timestamp: "2026-07-03"
---
# The University of Virginia's College at Wise, VA
# Virginia Beach, VA
City government — 1 officeholder mapped.
## Source
- government: Atlas officeholders v3 (2026-07-04)
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,20 +1,25 @@
---
type: Jurisdiction
title: "Superior, WI"
classification: city
classification: village
geoid: "5578660"
state: "WI"
counties: ["Douglas"]
sources:
- field: government
source: "Atlas officeholders v3 (2026-07-04)"
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, wi]
tags: [jurisdiction, village, wi]
timestamp: "2026-07-03"
---
# Superior, WI
City government — 1 officeholder mapped.
Village government — 1 officeholder mapped.
## Source
- government: Atlas officeholders v3 (2026-07-04)
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,20 +1,25 @@
---
type: Jurisdiction
title: "Pewaukee, WI"
classification: city
classification: village
geoid: "5562250"
state: "WI"
counties: ["Waukesha"]
sources:
- field: government
source: "Atlas officeholders v3 (2026-07-04)"
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, wi]
tags: [jurisdiction, village, wi]
timestamp: "2026-07-03"
---
# Pewaukee, WI
City government — 1 officeholder mapped.
Village government — 1 officeholder mapped.
## Source
- government: Atlas officeholders v3 (2026-07-04)
- identity: Census place GEOID (place_county_crosswalk)
@@ -1,20 +1,25 @@
---
type: Jurisdiction
title: "Waukesha, WI"
classification: city
classification: village
geoid: "5584275"
state: "WI"
counties: ["Waukesha"]
sources:
- field: government
source: "Atlas officeholders v3 (2026-07-04)"
- field: identity
source: "Census place GEOID (place_county_crosswalk)"
confidence: official
tags: [jurisdiction, city, wi]
tags: [jurisdiction, village, wi]
timestamp: "2026-07-03"
---
# Waukesha, WI
City government — 1 officeholder mapped.
Village government — 1 officeholder mapped.
## Source
- government: Atlas officeholders v3 (2026-07-04)
- identity: Census place GEOID (place_county_crosswalk)
File diff suppressed because it is too large Load Diff
+13 -1
View File
@@ -969,6 +969,16 @@ def main():
# ---- city jurisdictions (incorporated Census places) ----
by_name, geoid_meta = city_index(crosswalk)
# Exact place GEOIDs resolved at the source by Atlas (PostGIS), keyed by
# office/person id — preferred over the name-based fuzzy resolver so filled
# cities land on their node exactly rather than by 98.8% name match.
geoid_exact = {}
for r in load("officeholders-municipal-geoid.jsonl"):
if r.get("place_geoid"):
if r.get("office_id"):
geoid_exact[("o", r["office_id"])] = r["place_geoid"]
if r.get("person_id"):
geoid_exact[("p", r["person_id"])] = r["place_geoid"]
# (a) filled cities — one node per municipal-officeholder folder, written
# into the folder its people already occupy (co-located by construction).
@@ -984,7 +994,9 @@ def main():
"label": officeholder_place_name(rec),
"st_abbr": rec.get("state_abbr")}
f["n"] += 1
g = resolve_place_geoid(rec, by_name)
g = (geoid_exact.get(("o", rec.get("office_id")))
or geoid_exact.get(("p", rec.get("person_id")))
or resolve_place_geoid(rec, by_name))
if g:
f["geoids"][g] = f["geoids"].get(g, 0) + 1