Repository navigation
Charts: density map of adult blacktip capture locations (#174) - #179
Conversation
/adults gets a map of where adults are caught: a Gaussian kernel density of the GPS points (Silverman bandwidth with a 0.3 km floor) on the sequential scale, under the single capture spots. Points on land, more than 5 km offshore or with a positive longitude are left out and counted in the note; the note also says density follows fishing effort. Below 20 points only the dots are drawn. InteractiveMap gains a toggleable density layer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/lib/components/InteractiveMap.svelte
|
Reviewed all five changed files and pushed a fix. [P2] Keep GPS exclusions visible when no usable points remain. The whole location section was guarded by Fixed in 4c7bd34, with two browser regressions in a4c526b. These inject synthetic response data for all-missing GPS and mixed missing/rejected GPS, and verify the empty state and counts. No source workbooks were altered. Reviewed KDE bandwidth/grid/binning, coastline checks and density layers. The tooltip and playback fixes from #177/#178 are merged into this branch and propagated to #184. Final combined-stack validation: lint, type checks, production build, 126 unit tests and all 41 browser tests passed. Two opt-in real-data tests were skipped because private data is unavailable. The existing lab question about publishing capture locations remains open; no PR was merged or deployed. |
|
Re-reviewed #179 against its parent, including KDE bandwidth/grid/binning, coordinate rejection rules, counts for missing/rejected GPS, density overlay ordering/toggles, and the existing all-unusable-GPS regressions. No additional defect found in this PR's own changes. Merged the reviewed parent fix from #178 (bbb7442) without conflicts, so this branch retains keyboard access to move maps and the SVG fallback. The map still describes capture density and uneven fishing effort; it does not claim adult habitat use. Validated final head 7c3cc05: pnpm lint; pnpm check (0 errors/warnings); pnpm test (122 passed, 2 opt-in tests skipped); opt-in real-data import test (1 passed); pnpm build; pnpm test:e2e (43 passed, including both GPS empty states and the inherited keyboard regressions). Parent-fix merge pushed. Review complete; no spreadsheets changed. |
Closes #174. Stacked on #178 → #177; merge those first.
What
/adults→ "Where adults are caught": a kernel density of adult capture GPS points on the sequential--seqscale (5 classes, cells under 5% of the peak dropped), with the single capture spots on top. Each layer has its own toggle.analytics/density.ts: Gaussian KDE on a local km projection, Silverman bandwidth with a 0.3 km floor, 60-cell grid, and ≥ 20 points before a surface is drawn (otherwise dots only). Also hasonLand/kmFromCoastchecks against the Moorea outline. Unit tests use simulated clusters.InteractiveMap: newdensityprop (grid cells → rectangles, CSS-coloured, non-interactive).Real data
39 usable points → bandwidth hits the 0.3 km floor; the surface shows three capture areas. 20 captures have no GPS point.
Open
Whether showing this publicly is fine is question 2 in #176 (the same points are already public as dots on
/nurseries).Checks
pnpm lint,pnpm check,pnpm test(122 passed),pnpm build,pnpm test:e2e(38 passed).🤖 Generated with Claude Code