Release God's Eye View as open source

This commit is contained in:
Bilawal Sidhu committed 2026-08-24 17:02:16 -05:00
1 parent a5aaea7e16
commit 880a672b5e
433 files changed
+219893 -23

No files matched your search

@@ -0,0 +1,46 @@
# Bundled neighborhood polygons — provenance & license
These per-city GeoJSON files give the annotation resolver **real neighborhood boundaries**
for places OSM tags as label-nodes-only (Chinatown, the Marina, the Mission, …), instead of
a flaky live-Overpass lookup or a synthesized buffer disc. Looked up by point-in-polygon +
name (see `src/data/neighborhoodPolygons.js`).
## Provenance
| File | Source | License | Retrieved |
|---|---|---|---|
| `san-francisco.json` | City & County of San Francisco — **DataSF "Analysis Neighborhoods"** (dataset `j2bu-swwd`, published via map view [`p5b7-5n3h`](https://data.sfgov.org/Geographic-Locations-and-Boundaries/Analysis-Neighborhoods-Map/p5b7-5n3h)) | **PDDL 1.0** (Open Data Commons Public Domain Dedication and License — public domain) | 2026-07-30 |
### san-francisco.json
- **Downloaded from:** `https://data.sfgov.org/resource/j2bu-swwd.geojson?$limit=100`
(HTTP 200, 1,713,909 bytes, retrieved 2026-07-30). The catalog page is the
"Analysis Neighborhoods" map view `p5b7-5n3h`, which is backed by dataset
`j2bu-swwd` (columns `the_geom`, `nhood`); the legacy
`api/geospatial/p5b7-5n3h?method=export` endpoint no longer serves the geometry
after DataSF's November 2023 map-format migration.
- **License evidence:** the dataset metadata (`https://data.sfgov.org/api/views/j2bu-swwd.json`,
and identically on `p5b7-5n3h`) declares
`"licenseId": "PDDL"` / `"license": {"name": "Open Data Commons Public Domain
Dedication and License", "termsLink": "http://opendatacommons.org/licenses/pddl/1.0/"}`.
Public domain — fully compatible with this repo's public release.
- **Content:** all **41** Analysis Neighborhoods, created by SF DPH and the Mayor's
Office of Housing and Community Development (with the Planning Department) from
groupings of 2010 Census tracts. Dataset last updated upstream 2023-10-17.
- **Transform:** `scripts/build-sf-neighborhoods.mjs` (deterministic; re-run it against
the raw download to reproduce the bundled file byte-for-byte):
1. `properties.nhood` → `properties.name` — names kept **verbatim**, no renames or
aliasing.
2. Douglas-Peucker simplification per ring, tolerance 2e-5° (~2 m) — trims
hyper-detailed shoreline vertices without visibly moving boundaries
(42,667 → 9,150 vertices).
3. Coordinates rounded to 6 decimals (~0.1 m), consecutive duplicates dropped,
rings re-closed.
4. Single-part MultiPolygons collapsed to `Polygon`; features sorted by name.
## File format
`FeatureCollection` with `city` + `features[]`, each `{ properties: { name }, geometry:
Polygon|MultiPolygon }`, coordinates `[lon, lat]` rounded to 6 decimals. The lookup module
is **source-agnostic** — to add or swap a city, drop in a file with this shape and register
it in `CITY_FILES` in `src/data/neighborhoodPolygons.js`.
@@ -0,0 +1 @@
{"type":"FeatureCollection","city":"San Francisco","source":"DataSF \"Analysis Neighborhoods\" (dataset j2bu-swwd, map view p5b7-5n3h) — PDDL 1.0 (public domain); see SOURCE.md","features":[{"type":"Feature","properties":{"name":"Bayview Hunters Point"},"geometry":{"type":"Polygon","coordinates":[[[-122.381578,37.75307],[-122.381592,37.753094],[-122.38145,37.752971],[-122.381282,37.752922],[-122.380878,37.752955],[-122.380535,37.752903],[-122.380016,37.752922],[-122.379881,37.752887],[-122.379852,37.752847],[-122.379864,37.7528],[-122.379997,37.752748],[-122.380025,37.752707],[-122.37996,37.75203],[-122.376087,37.752249],[-122.375771,37.748707],[-122.384914,37.748145],[-122.384921,37.748185],[-122.384651,37.748202],[-122.384665,37.748304],[-122.384738,37.748303],[-122.38502,37.748205],[-122.385117,37.748109],[-122.385286,37.748166],[-122.385459,37.748109],[-122.385822,37.748146],[-122.385932,37.748066],[-122.386113,37.748083],[-122.386182,37.748041],[-122.386219,37.747947],[-122.386271,37.747906],[-122.386351,37.747898],[-122.386456,37.74795],[-122.38679,37.747885],[-122.387126,37.747617],[-122.387338,37.747591],[-122.387529,37.747604],[-122.387635,37.747763],[-122.387659,37.747758],[-122.387636,37.747775],[-122.387652,37.74782],[-122.387769,37.747851],[-122.388109,37.747833],[-122.388075,37.747796],[-122.388108,37.747795],[-122.3881,37.747712],[-122.388148,37.747711],[-122.388153,37.747826],[-122.388619,37.747815],[-122.388865,37.747768],[-122.389542,37.747774],[-122.390289,37.747699],[-122.390413,37.747713],[-122.390527,37.747743],[-122.390654,37.747824],[-122.390634,37.747755],[-122.390674,37.747768],[-122.39076,37.747895],[-122.39085,37.747964],[-122.391158,37.748016],[-122.391297,37.748116],[-122.392161,37.748473],[-122.392646,37.748471],[-122.392933,37.748546],[-122.393041,37.748461],[-122.393077,37.748129],[-122.39298,37.747588],[-122.392907,37.747545],[-122.392911,37.747441],[-122.392769,37.747457],[-122.392569,37.747425],[-122.39231,37.747223],[-122.391564,37.747006],[-122.391516,37.747108],[-122.391633,37.747168],[-122.391611,37.747227],[-122.391285,37.747136],[-122.391305,37.747081],[-122.3914,37.747106],[-122.39145,37.747086],[-122.391498,37.746975],[-122.390492,37.746694],[-122.389167,37.746772],[-122.388206,37.746945],[-122.388204,37.746983],[-122.388121,37.746993],[-122.388117,37.746949],[-122.387705,37.746939],[-122.387599,37.746969],[-122.387589,37.747026],[-122.387462,37.747102],[-122.387058,37.747103],[-122.38702,37.747065],[-122.387006,37.746912],[-122.382709,37.747165],[-122.382019,37.747062],[-122.379659,37.747208],[-122.379608,37.74698],[-122.378632,37.747048],[-122.378127,37.747124],[-122.376092,37.747144],[-122.375737,37.747089],[-122.37541,37.746996],[-122.375184,37.746879],[-122.374986,37.746711],[-122.374795,37.746475],[-122.374769,37.746402],[-122.374952,37.745846],[-122.374945,37.745781],[-122.374115,37.744972],[-122.374024,37.744949],[-122.373914,37.744974],[-122.373847,37.745038],[-122.373854,37.745086],[-122.373357,37.745372],[-122.373171,37.745415],[-122.372956,37.745387],[-122.372762,37.745505],[-122.367631,37.740134],[-122.367868,37.739994],[-122.368286,37.739976],[-122.368274,37.739828],[-122.371253,37.739664],[-122.371264,37.739793],[-122.373407,37.739661],[-122.373454,37.739619],[-122.373969,37.739561],[-122.374008,37.73952],[-122.374004,37.739467],[-122.373816,37.739235],[-122.373598,37.738805],[-122.373429,37.738623],[-122.373176,37.738452],[-122.372924,37.738348],[-122.372603,37.738282],[-122.37116,37.738175],[-122.370586,37.738199],[-122.370542,37.738153],[-122.370404,37.738203],[-122.36947,37.738269],[-122.368495,37.73825],[-122.367519,37.738344],[-122.367423,37.7383],[-122.367395,37.738222],[-122.367477,37.738138],[-122.367646,37.738075],[-122.368656,37.737934],[-122.368869,37.737862],[-122.369023,37.737767],[-122.369536,37.737714],[-122.369938,37.737568],[-122.370307,37.73749],[-122.37055,37.737373],[-122.370787,37.737365],[-122.371041,37.73716],[-122.371297,37.737063],[-122.371616,37.73708],[-122.371928,37.737034],[-122.37205,37.737076],[-122.372129,37.737163],[-122.372281,37.73713],[-122.372306,37.737088],[-122.372923,37.737043],[-122.373201,37.737071],[-122.373537,37.737176],[-122.374322,37.737787],[-122.374527,37.73782],[-122.375538,37.738348],[-122.375979,37.738477],[-122.376182,37.738456],[-122.37632,37.738394],[-122.376458,37.738252],[-122.376018,37.737991],[-122.375562,37.737987],[-122.37534,37.737924],[-122.375139,37.737804],[-122.374952,37.737564],[-122.374883,37.737295],[-122.374907,37.737087],[-122.375052,37.736843],[-122.375028,37.736746],[-122.375151,37.736579],[-122.375165,37.736415],[-122.375237,37.736225],[-122.375565,37.735998],[-122.375737,37.735829],[-122.375948,37.735843],[-122.375966,37.735816],[-122.375881,37.735629],[-122.375898,37.735531],[-122.375828,37.735493],[-122.37587,37.735483],[-122.37585,37.735453],[-122.375928,37.735385],[-122.376,37.735186],[-122.375874,37.735048],[-122.375572,37.735239],[-122.375461,37.735359],[-122.37532,Line truncated