bead-bind-startup — hydrant-analysis (Hydrant Analysis)

**Bead document** from Bead: Hydrant Analysis · [canonical source](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/bead-bind-startup.md) · discussion: Talk: Hydrant Analysis

**Current focus:** five WebGPU sketches deployed. Sketch 1's answers are processed (sketches 4 and 5 are the responses); sketches 2, 3, 4, 5 await Stephen's answers via their in-page panels (answers PUT to `uploads/`). **Do this first:** open [artifacts/sketches/index.html](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/index.html) in a WebGPU browser.

## Decisions on record (sketch answers in `uploads/`, 2026-07-08) - Points route: **baked quads, ship it** (no bundle rebuild for points). - Frame: **GeoFrame anchored at NYC** + **OSM baselayer** → built as sketch 5. - Attribute vs join: **surface the disagreement as a data-quality layer** → built as sketch 4 (43 mismatches, 41 = Marble Hill; 37 no-polygon). - Basemap for anything real: **Esri aerial** → sketch 5 v0.2 default (OSM kept as dev option). - Analysis home: **flat local meters until multi-city**, GeoFrame is presentation. - Drape refinement **confirmed live by Stephen** (headless base-zoom stall = harness artifact, caveat closed). - Density coloring belongs in the globe view → sketch 5 v0.2 tints hydrants by per-NTA density from the citywide GPU join.

## v0.2 answers (drained 2026-07-08; triple-PUT of one response, debounce bug noted) - Density in globe view: **points for close-up, choropleth past a zoom-out threshold**; **remove any fog effects**. - Clamping: **skip it — flatten terrain under the analysis area**. - Queued as sketch-5 v0.3 work, pending the platform decision below.

## Platform decisions (2026-07-08, settled) - **Leaflet ships** as the 2D analysis home ([hydrants-leaflet.html](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/hydrants-leaflet.html)); joins are the exact offline CPU join (13,305 = PostGIS). - **Coverage instrument lives on BOTH shipping pages** (his Leaflet-v1 answers): shared `makeCoverageEngine` in `common.js` (mercator space); Leaflet = image overlay behind `navigator.gpu` check; taos = draped strip. - **Taos shipping page** ([hydrants-taos.html](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/hydrants-taos.html)): haze off (`lighting.disableAerial`), flat static-mosaic ground, altitude-switched density. - Advice record: [notes/leaflet-vs-webgpu-advice.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/notes/leaflet-vs-webgpu-advice.md).

## Todo - [ ] Stephen: the Leaflet page's one open question (does the instrument need the geos-wasm fallback before shipping publicly?). - [ ] v1.1 gap on the taos page: streamed tile quadtree for street-level ground crispness (static z14 mosaic is ~7 m/px). - [ ] geos-wasm fallback for the coverage instrument (non-WebGPU browsers currently get a disabled checkbox with a note). - [ ] Stephen: answer sketches 2, 3, 4 panels if still relevant (the shipping pages may have superseded them). - [ ] Drain `uploads/` when answers land (draining the dock is a bead-step). - [x] ~~Sketch-5 v0.3~~ superseded by hydrants-taos.html (fog off, flat ground, zoom-threshold choropleth all landed there). - [x] Debounce the send button (done in common.js). - [ ] Chase the coverage gap: raster "fully covered" 7/38 vs upstream exact 24/38 at 100m (sketch 3's raster-cell slider is the probe). - [ ] Compare the three area computations (source `shape_area`, preprocessing shoelace, PostGIS). - [ ] Decide binary layout future: bespoke (current) vs GeoArrow/GeoParquet framing; uint16 quantization. - [ ] File the ortho+reversedZ farther-wins depth quirk upstream — repro + fix lead in [notes/taos-ortho-reversedz-depth-quirk.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/notes/taos-ortho-reversedz-depth-quirk.md). - [ ] Proposals A (DuckDB-WASM) and C (GeoArrow + workers) from [browser-workflow-proposals.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/notes/browser-workflow-proposals.md) remain unbuilt options; sketch 4 Q3 offers DuckDB-WASM as the exactness arbiter.

## Pointers - Sketches: [artifacts/sketches/](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/index.html) (v0.1 · 2026-07-08; `common.js` + `sketch.css` shared; `window.__sketch` = CDP driving hook) - Data: [artifacts/data/](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/data/) — EPSG:32118 binaries + lon/lat + JSON sidecars ([preprocess.mjs](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/preprocess/preprocess.mjs), [fetch-lonlat.mjs](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/preprocess/fetch-lonlat.mjs)) - Notes: [source-data-format](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/notes/source-data-format.md) · [browser-workflow-proposals](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/notes/browser-workflow-proposals.md) · [taos depth quirk](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/notes/taos-ortho-reversedz-depth-quirk.md) - Spec: [repo/analysis.sql](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/repo/analysis.sql) · upstream [github.com/leila-ayad/nyc-hydrant-analysis](https://github.com/leila-ayad/nyc-hydrant-analysis/) - Engine: hosted bundle [redfish.acequia.io/taos/taos-engine.js](https://redfish.acequia.io/taos/taos-engine.js) — bundle-era API notes: `CameraController` is not a Component (attach + per-frame update; pitch sign-inverted, positive = down); no `Quaternion.fromForward`; `new Mat4()` is zeros. - Chat logs: [2026-07-07/chats/](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/chats/)