Every number on this site is a GROUP BY over a single table of
4,808,866 estimated service connections. The pipeline below builds that table
from thirty dated sources, and asserts on every run that meters summed by
block equal meters summed by section equal the grand total.
| Module | Does | Key output |
|---|---|---|
extract.py |
Paginated ArcGIS REST harvest, then assemble. Three services return error bodies under HTTP 200, so it checks the payload rather than the status code; TIGERweb needs OBJECTID-window paging because it lies about its page size. | 30 dated source layers |
territory.py |
Erases municipal utilities from SCE's own polygon, opt-in per utility with a recorded reason. | 131,456 km² net |
clip.py |
County parcels to net territory; builds parcel_uid and gates on
its uniqueness. Assessor numbers are not primary keys — ~42,000 across
seven counties are duplicated. |
4,133,590 parcels |
allocate.py |
Parcel to block, place and line section, on geometry alone. Split from the units model so a crosswalk change re-runs a cheap join, not a 4M-parcel spatial one. | allocation per parcel |
crosswalk.py |
Seeds the use-code crosswalk from observed vocabularies; carries forward rows it cannot observe, after a rebuild once silently zeroed 795,000 meters. | config/crosswalk.csv |
calibrate.py |
Non-negative least squares of units-per-code against decennial HU100, then rakes to the control margin. Agreement on the total is true by construction and must not be read as accuracy — the per-block spread is the honest measure. | fitted coefficients |
units.py |
Class, dwelling units and meters per parcel. Rounding is stochastic, keyed on a hash of the parcel id: rounding independently discarded 13% of one county's services. | units per parcel |
service_points.py |
Fans out to one row per metered service and asserts the invariant globally. | 4,808,866 service points |
roads.py |
Overture transportation queried in place on S3 with bbox pushdown. Only drivable classes: unfiltered, footways outnumbered residential streets three to one. | 171,334 route km |
index.py |
The composite difficulty index and its rollups. Components are percentile ranks, not min-max — one section carries 4,488 meters and another 252 km of road. | 272,354 scored sections |
cube.py |
Meters per geography × install class, every level from one pass over the fact table. | 8 cube levels |
geo_levels.py |
Attaches geometry to each cube level. Tracts and block groups are dissolved from blocks rather than harvested, so the boundaries cannot disagree at the seams. | tiling inputs |
export.py |
GeoParquet, CSV, OpenFileGDB, catalogue and citation. Reads the geodatabase back and refuses to finish if a layer came up short. | the distribution |
tiles.py |
PMTiles archives with per-layer zoom bands. A generalised layer drawn outside its band looks like corrupted data. | 3 tile archives |