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:
+7
-2
@@ -1,20 +1,25 @@
|
|||||||
---
|
---
|
||||||
type: Jurisdiction
|
type: Jurisdiction
|
||||||
title: "Pecos, TX"
|
title: "Town of Pecos, TX"
|
||||||
classification: city
|
classification: city
|
||||||
|
geoid: "4873493"
|
||||||
state: "TX"
|
state: "TX"
|
||||||
|
counties: ["Reeves"]
|
||||||
sources:
|
sources:
|
||||||
- field: government
|
- field: government
|
||||||
source: "Atlas officeholders v3 (2026-07-04)"
|
source: "Atlas officeholders v3 (2026-07-04)"
|
||||||
|
- field: identity
|
||||||
|
source: "Census place GEOID (place_county_crosswalk)"
|
||||||
confidence: official
|
confidence: official
|
||||||
tags: [jurisdiction, city, tx]
|
tags: [jurisdiction, city, tx]
|
||||||
timestamp: "2026-07-03"
|
timestamp: "2026-07-03"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Pecos, TX
|
# Town of Pecos, TX
|
||||||
|
|
||||||
City government — 1 officeholder mapped.
|
City government — 1 officeholder mapped.
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
- government: Atlas officeholders v3 (2026-07-04)
|
- government: Atlas officeholders v3 (2026-07-04)
|
||||||
|
- identity: Census place GEOID (place_county_crosswalk)
|
||||||
|
|||||||
+7
-2
@@ -1,20 +1,25 @@
|
|||||||
---
|
---
|
||||||
type: Jurisdiction
|
type: Jurisdiction
|
||||||
title: "West Falls Church, VA"
|
title: "Falls Church, VA"
|
||||||
classification: city
|
classification: city
|
||||||
|
geoid: "5127200"
|
||||||
state: "VA"
|
state: "VA"
|
||||||
|
counties: ["Falls Church"]
|
||||||
sources:
|
sources:
|
||||||
- field: government
|
- field: government
|
||||||
source: "Atlas officeholders v3 (2026-07-04)"
|
source: "Atlas officeholders v3 (2026-07-04)"
|
||||||
|
- field: identity
|
||||||
|
source: "Census place GEOID (place_county_crosswalk)"
|
||||||
confidence: official
|
confidence: official
|
||||||
tags: [jurisdiction, city, va]
|
tags: [jurisdiction, city, va]
|
||||||
timestamp: "2026-07-03"
|
timestamp: "2026-07-03"
|
||||||
---
|
---
|
||||||
|
|
||||||
# West Falls Church, VA
|
# Falls Church, VA
|
||||||
|
|
||||||
City government — 1 officeholder mapped.
|
City government — 1 officeholder mapped.
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
- government: Atlas officeholders v3 (2026-07-04)
|
- government: Atlas officeholders v3 (2026-07-04)
|
||||||
|
- identity: Census place GEOID (place_county_crosswalk)
|
||||||
|
|||||||
-22
@@ -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)
|
|
||||||
+7
-2
@@ -1,20 +1,25 @@
|
|||||||
---
|
---
|
||||||
type: Jurisdiction
|
type: Jurisdiction
|
||||||
title: "East Lexington, VA"
|
title: "Lexington, VA"
|
||||||
classification: city
|
classification: city
|
||||||
|
geoid: "5145512"
|
||||||
state: "VA"
|
state: "VA"
|
||||||
|
counties: ["Lexington"]
|
||||||
sources:
|
sources:
|
||||||
- field: government
|
- field: government
|
||||||
source: "Atlas officeholders v3 (2026-07-04)"
|
source: "Atlas officeholders v3 (2026-07-04)"
|
||||||
|
- field: identity
|
||||||
|
source: "Census place GEOID (place_county_crosswalk)"
|
||||||
confidence: official
|
confidence: official
|
||||||
tags: [jurisdiction, city, va]
|
tags: [jurisdiction, city, va]
|
||||||
timestamp: "2026-07-03"
|
timestamp: "2026-07-03"
|
||||||
---
|
---
|
||||||
|
|
||||||
# East Lexington, VA
|
# Lexington, VA
|
||||||
|
|
||||||
City government — 1 officeholder mapped.
|
City government — 1 officeholder mapped.
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
- government: Atlas officeholders v3 (2026-07-04)
|
- government: Atlas officeholders v3 (2026-07-04)
|
||||||
|
- identity: Census place GEOID (place_county_crosswalk)
|
||||||
|
|||||||
-22
@@ -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)
|
|
||||||
+7
-2
@@ -1,20 +1,25 @@
|
|||||||
---
|
---
|
||||||
type: Jurisdiction
|
type: Jurisdiction
|
||||||
title: "The University of Virginia's College at Wise, VA"
|
title: "Virginia Beach, VA"
|
||||||
classification: city
|
classification: city
|
||||||
|
geoid: "5182000"
|
||||||
state: "VA"
|
state: "VA"
|
||||||
|
counties: ["Virginia Beach"]
|
||||||
sources:
|
sources:
|
||||||
- field: government
|
- field: government
|
||||||
source: "Atlas officeholders v3 (2026-07-04)"
|
source: "Atlas officeholders v3 (2026-07-04)"
|
||||||
|
- field: identity
|
||||||
|
source: "Census place GEOID (place_county_crosswalk)"
|
||||||
confidence: official
|
confidence: official
|
||||||
tags: [jurisdiction, city, va]
|
tags: [jurisdiction, city, va]
|
||||||
timestamp: "2026-07-03"
|
timestamp: "2026-07-03"
|
||||||
---
|
---
|
||||||
|
|
||||||
# The University of Virginia's College at Wise, VA
|
# Virginia Beach, VA
|
||||||
|
|
||||||
City government — 1 officeholder mapped.
|
City government — 1 officeholder mapped.
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
- government: Atlas officeholders v3 (2026-07-04)
|
- government: Atlas officeholders v3 (2026-07-04)
|
||||||
|
- identity: Census place GEOID (place_county_crosswalk)
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
---
|
---
|
||||||
type: Jurisdiction
|
type: Jurisdiction
|
||||||
title: "Superior, WI"
|
title: "Superior, WI"
|
||||||
classification: city
|
classification: village
|
||||||
|
geoid: "5578660"
|
||||||
state: "WI"
|
state: "WI"
|
||||||
|
counties: ["Douglas"]
|
||||||
sources:
|
sources:
|
||||||
- field: government
|
- field: government
|
||||||
source: "Atlas officeholders v3 (2026-07-04)"
|
source: "Atlas officeholders v3 (2026-07-04)"
|
||||||
|
- field: identity
|
||||||
|
source: "Census place GEOID (place_county_crosswalk)"
|
||||||
confidence: official
|
confidence: official
|
||||||
tags: [jurisdiction, city, wi]
|
tags: [jurisdiction, village, wi]
|
||||||
timestamp: "2026-07-03"
|
timestamp: "2026-07-03"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Superior, WI
|
# Superior, WI
|
||||||
|
|
||||||
City government — 1 officeholder mapped.
|
Village government — 1 officeholder mapped.
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
- government: Atlas officeholders v3 (2026-07-04)
|
- government: Atlas officeholders v3 (2026-07-04)
|
||||||
|
- identity: Census place GEOID (place_county_crosswalk)
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
---
|
---
|
||||||
type: Jurisdiction
|
type: Jurisdiction
|
||||||
title: "Pewaukee, WI"
|
title: "Pewaukee, WI"
|
||||||
classification: city
|
classification: village
|
||||||
|
geoid: "5562250"
|
||||||
state: "WI"
|
state: "WI"
|
||||||
|
counties: ["Waukesha"]
|
||||||
sources:
|
sources:
|
||||||
- field: government
|
- field: government
|
||||||
source: "Atlas officeholders v3 (2026-07-04)"
|
source: "Atlas officeholders v3 (2026-07-04)"
|
||||||
|
- field: identity
|
||||||
|
source: "Census place GEOID (place_county_crosswalk)"
|
||||||
confidence: official
|
confidence: official
|
||||||
tags: [jurisdiction, city, wi]
|
tags: [jurisdiction, village, wi]
|
||||||
timestamp: "2026-07-03"
|
timestamp: "2026-07-03"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Pewaukee, WI
|
# Pewaukee, WI
|
||||||
|
|
||||||
City government — 1 officeholder mapped.
|
Village government — 1 officeholder mapped.
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
- government: Atlas officeholders v3 (2026-07-04)
|
- government: Atlas officeholders v3 (2026-07-04)
|
||||||
|
- identity: Census place GEOID (place_county_crosswalk)
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
---
|
---
|
||||||
type: Jurisdiction
|
type: Jurisdiction
|
||||||
title: "Waukesha, WI"
|
title: "Waukesha, WI"
|
||||||
classification: city
|
classification: village
|
||||||
|
geoid: "5584275"
|
||||||
state: "WI"
|
state: "WI"
|
||||||
|
counties: ["Waukesha"]
|
||||||
sources:
|
sources:
|
||||||
- field: government
|
- field: government
|
||||||
source: "Atlas officeholders v3 (2026-07-04)"
|
source: "Atlas officeholders v3 (2026-07-04)"
|
||||||
|
- field: identity
|
||||||
|
source: "Census place GEOID (place_county_crosswalk)"
|
||||||
confidence: official
|
confidence: official
|
||||||
tags: [jurisdiction, city, wi]
|
tags: [jurisdiction, village, wi]
|
||||||
timestamp: "2026-07-03"
|
timestamp: "2026-07-03"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Waukesha, WI
|
# Waukesha, WI
|
||||||
|
|
||||||
City government — 1 officeholder mapped.
|
Village government — 1 officeholder mapped.
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
- government: Atlas officeholders v3 (2026-07-04)
|
- government: Atlas officeholders v3 (2026-07-04)
|
||||||
|
- identity: Census place GEOID (place_county_crosswalk)
|
||||||
|
|||||||
Executable
+3979
File diff suppressed because it is too large
Load Diff
+13
-1
@@ -969,6 +969,16 @@ def main():
|
|||||||
|
|
||||||
# ---- city jurisdictions (incorporated Census places) ----
|
# ---- city jurisdictions (incorporated Census places) ----
|
||||||
by_name, geoid_meta = city_index(crosswalk)
|
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
|
# (a) filled cities — one node per municipal-officeholder folder, written
|
||||||
# into the folder its people already occupy (co-located by construction).
|
# into the folder its people already occupy (co-located by construction).
|
||||||
@@ -984,7 +994,9 @@ def main():
|
|||||||
"label": officeholder_place_name(rec),
|
"label": officeholder_place_name(rec),
|
||||||
"st_abbr": rec.get("state_abbr")}
|
"st_abbr": rec.get("state_abbr")}
|
||||||
f["n"] += 1
|
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:
|
if g:
|
||||||
f["geoids"][g] = f["geoids"].get(g, 0) + 1
|
f["geoids"][g] = f["geoids"].get(g, 0) + 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user