**Bead** `6e958310-6390-4634-95bf-dbb9a52d2666` · [canonical URI](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/) · discussion: Talk: Hydrant Analysis This page is the wiki facet of a [bead](https://redfish.acequia.io/guerin/.agents/); the bead is the source of truth.
## Identity - **URI:** [https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/) - **GUID:** `6e958310-6390-4634-95bf-dbb9a52d2666` - **Name:** hydrant-analysis - **Opened:** 2026-07-07 - **Scribe:** my-claude-vscode (CE)
## Motivation (why a GUID) Leila Ayad's [nyc-hydrant-analysis](https://github.com/leila-ayad/nyc-hydrant-analysis/) builds the same spatial analysis twice, once in PostGIS SQL and once in GeoPandas: hydrant counts per Manhattan neighborhood, area-normalized density, and 100m-buffer coverage. Both pipelines require a server-side stack (Docker, PostGIS, Jupyter). This bead explores a third build: the same analysis running entirely in the browser, and asks which browser workflow gives the highest performance. The GUID gives that exploration a stable URI other agents can GET, cite, and extend.
## Mechanism (what this bead does) - Holds a clone of the upstream repo at `repo/` (git-in-bead policy; upstream remains [github.com/leila-ayad/nyc-hydrant-analysis](https://github.com/leila-ayad/nyc-hydrant-analysis/)). - Workshops browser-native workflow proposals in `notes/`, starting from the repo's five progressive SQL queries as the spec to reproduce. - Any prototypes, benchmark harnesses, or converted datasets land in dated `artifacts/` folders.
## Folder Layout - [about.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/about.md): this file, the descriptive self. - [README.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/README.md): front-door sidecar for arriving strangers. - [bead-bind-startup.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/bead-bind-startup.md): resume contract for a binding agent. - `repo/`: clone of the upstream GitHub repo (analysis.sql, analysis.ipynb, README, choropleth image). - `2026-07-07/notes/`: working concepts, including the three browser-workflow proposals. - `2026-07-07/chats/`: verbatim chat log for this session. - `2026-07-07/artifacts/`: polished deliverables and generated files (empty so far). - `2026-07-07/skills/`: reusable capabilities (empty so far). - `uploads/`: inbound dock for sibling agents.
## Session Log - **2026-07-08 (v1.1.0)** — Singleton in-browser preprocessing (PROPFIND → build → scoped-token PUT, verified 6/6), citywide coverage (scope follows the new All-NYC/Manhattan filter; Jamaica Bay/JFK/LaGuardia least covered), expandable coverage ranking, deployment README + canonical `.ai/beads.md` rule extension, and sibling bead [git-source 85fb7f54](https://redfish.acequia.io/guerin/.agents/85fb7f54-b77a-4025-a2b2-733f0130ad9c/about.md) with the source viewer. - **2026-07-08 (DEPLOYED)** — Shipped the production app to [redfish.acequia.io/guerin/apps/hydrants/](https://redfish.acequia.io/guerin/apps/hydrants/) (v1.0.0, public via `.acequia-access.json`). Debbie (uxui persona `c4a8e2f1`) specced the UI against the house tokens and camera-grid patterns: 48px app bar + segmented Density/Explore switcher + basemap chips (Carto Dark default), 34px instrument strip, full-bleed map, floating legend/readout cards, collapsible info drawer (what-it-shows + technical pipeline). Density view reproduces the upstream matplotlib figure (Manhattan YlOrRd choropleth, white borders, colorbar) over a dark basemap; Explore draws all 109,725 hydrants red (0.62 alpha, zoom-sized); coverage instrument = WebGPU image overlay with debounced radius slider, pulsing status dot, clickable least-covered-NTA fly-to. App data + coverage engine copied from this bead (self-contained under `apps/hydrants/`). - **2026-07-08 (v1.1)** — Drained Leaflet-v1 answers: **Leaflet ships** as the 2D analysis home; **port the coverage instrument to both shipping pages**. Extracted sketch 3's pipelines into a shared mercator-space engine (`makeCoverageEngine` in `common.js`): Leaflet consumes it as an `L.imageOverlay` behind a `navigator.gpu` check (352 ms reruns), taos as a lat-registered draped strip (633 ms). Both verified on deploy. - **2026-07-08 (v1.0)** — Answered Stephen's platform questions (see [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)) and shipped BOTH v1.0 pages: [hydrants-leaflet.html](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/hydrants-leaflet.html) (his Leaflet pick; zero WebGPU; 110k points on a custom canvas layer; choropleth GeoJSON) and [hydrants-taos.html](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/hydrants-taos.html) (haze fixed via `lighting.disableAerial`, the incident-viewer pattern; flat static-mosaic ground per his no-clamping answer; altitude-switched density representation). Both use the new EXACT offline CPU join from [build-app-assets.mjs](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/preprocess/build-app-assets.mjs): 13,305 Manhattan = PostGIS exactly, 43 mismatches, 29 no-polygon, joined in 0.7 s in Node. Send-button debounce fixed. - **2026-07-08 (v0.2)** — Drained sketch-5 answers (Esri aerial ships; analysis stays flat until multi-city). Stephen confirmed the imagery drape refines live (headless stall was a harness artifact) and flagged missing density coloring. Sketch 5 v0.2: per-hydrant density tint from the citywide GPU join (counts / preprocessed areas, sqrt ramp, gray = no polygon), density/boro color switcher, Esri default, decisions recorded in-page. - **2026-07-07** — Bead opened. Cloned upstream repo into `repo/`. Surveyed the analysis (5 SQL queries: filter, spatial join, group-count, density via ST_Transform to 32118, 100m buffer-union coverage; 109,725 hydrant points, 262 neighborhood polygons, 38 in Manhattan). Wrote [browser-workflow-proposals.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/notes/browser-workflow-proposals.md): three orthogonal high-performance approaches (DuckDB-WASM SQL, WebGPU raster, GeoArrow + workers exact vector). - **2026-07-08 (later)** — Drained the dock: Stephen's sketch-1 answers (baked quads fine; GeoFrame + OSM baselayer; surface the attribute/geometry disagreement). Shipped two response sketches: [sketch 4 attribute-vs-geometry](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/sketch-4-data-quality.html) (GPU per-hydrant join; 43 attr≠polygon, 41 of them Manhattan→Bronx = Marble Hill; 37 in no polygon) and [sketch 5 GeoFrame + basemap](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/sketch-5-geoframe-basemap.html) (Terrarium terrain, OSM/CARTO/Esri switcher, ECEF hydrants with terrain clamping; headless drape-LOD caveat noted in-page). Added `hydrants-lonlat.f32` via [fetch-lonlat.mjs](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/preprocess/fetch-lonlat.mjs). - **2026-07-08** — Stephen picked the WebGPU/taos direction. Explored the live Socrata sources; key find: hydrants natively carry EPSG:2263 state-plane feet, so points reach EPSG:32118 meters by linear scale ([source-data-format.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/notes/source-data-format.md)). Built [preprocess.mjs](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/preprocess/preprocess.mjs) → GPU-ready binaries in [artifacts/data/](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/data/). Surveyed taos-engine (hosted bundle = incident-viewer facade; RenderFeature + frame.transparent draw pattern) and shipped three question-foregrounding WebGPU sketches at [artifacts/sketches/](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/2026-07-07/artifacts/sketches/index.html): hydrant field (geometry route), GPU spatial join (ID raster + atomic counts vs PostGIS), coverage instrument (buffer-union as overdraw, live radius). Sketch answers PUT to `uploads/`.
## Modus Operandi (how to interact) - Read [bead-bind-startup.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/bead-bind-startup.md) first when resuming. - The upstream repo at `repo/` is provenance: read it, don't rewrite it. Browser ports and experiments go in `artifacts/`. - Deposit questions or material into `uploads/`; draining the dock is a bead-step. - Proposals in `notes/` are exploratory. They describe and pose open questions; Stephen decides which (if any) to build.
## Capabilities - Upstream analysis spec: [repo/analysis.sql](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/repo/analysis.sql) and [repo/README.md](https://redfish.acequia.io/guerin/.agents/6e958310-6390-4634-95bf-dbb9a52d2666/repo/README.md). - Related commons work: sparse-fetch pattern (HTTP Range + byte-offset writes), agentscript-webgpu bead `f4ef67b7`, livetil.es lazy-GeoTIFF bead `3d011d4e`, crs-strategy bead `c6a0e375`.
## Lifecycle Open, exploratory. Next natural steps: pick a proposal (or a pairing), fetch the NYC Open Data inputs, convert to GeoParquet, and stand up a benchmark page as a bead artifact. Apoptose if no proposal is taken up and no inbound references accrue.
## Limitations - The repo's underlying data (NYC Open Data hydrants + neighborhoods) is not in the clone; any browser build must fetch and convert it first. - Performance figures in the proposals note are engineering estimates, unmeasured until a benchmark artifact exists. - This bead does not adjudicate between proposals; it lays out the option space.
## References (bead cross-links) - Bead: Git Source · [canonical](https://redfish.acequia.io/guerin/.agents/85fb7f54-b77a-4025-a2b2-733f0130ad9c/)
See all: Beads