From 253c884533d6c8c7abd4156103da253cccbd940b Mon Sep 17 00:00:00 2001 From: luen Date: Wed, 11 Nov 2026 09:20:50 +1000 Subject: [PATCH 1/3] Charts: density map of adult blacktip capture locations (#174) /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 --- src/lib/components/InteractiveMap.svelte | 63 ++++++++++- src/lib/server/analytics/density.test.ts | 57 ++++++++++ src/lib/server/analytics/density.ts | 131 +++++++++++++++++++++++ src/routes/adults/+page.server.ts | 36 +++++++ src/routes/adults/+page.svelte | 36 +++++++ 5 files changed, 319 insertions(+), 4 deletions(-) create mode 100644 src/lib/server/analytics/density.test.ts create mode 100644 src/lib/server/analytics/density.ts diff --git a/src/lib/components/InteractiveMap.svelte b/src/lib/components/InteractiveMap.svelte index 78aca48..4f232ed 100644 --- a/src/lib/components/InteractiveMap.svelte +++ b/src/lib/components/InteractiveMap.svelte @@ -1,6 +1,12 @@