Repository navigation
Charts: compare sampling conditions within nursery-months - #149
Conversation
- SST was always empty: it read ocean.oisst, which has no values at all (#154). It now uses the same series as the per-set SST. - One nursery-month holds a median of two fieldwork nights (97% have three or fewer), so each histogram compared about two nights with a month. The comparison now pools every month with fieldwork, weighting each month's days by its fieldwork nights, as #124 allows with explicit weights. Nights count once across nurseries and sets, since the weather is one island-wide series. - A within-month randomisation test (seeded, 5,000 draws) backs each chart, instead of no test: the reference contains the fieldwork nights, so a two-sample test would be wrong. Fieldwork nights are a little drier and calmer than their months. - Shared bins with labels (rain on an open-ended scale), percentages in a grouped bar chart, the reference in a muted colour, missing values counted per chart, plainer copy. - No query-string form: the section is part of the memoised /effort load and sits after the sampling calendar. - Tests: duplicate dates and nurseries, other sites and gear, month weights, month boundaries and leap days, missing values, a selection the test must flag, and a seeded p. - AGENTS.md: its own section, out of "Cyclones and heavy rain". - Merged main; IMPORTER_VERSION already 9 there, no bump needed here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed against the real data (aggregates only) and current
Two problems on the real data meant the charts couldn't answer #124's question, so I reworked the analysis. Pushed in 8c8f433, after merging 1. The SST chart was always empty. It read 2. One nursery-month is too small to plot. Across 693 nursery-months with fieldwork, the median is two fieldwork nights, and 97% have three or fewer. The default view (Apaura, February 2025) compared 2 nights with 28 days, so each 10-bin histogram moved in 50% steps. #124 allows pooling with explicit weights, so the section now pools:
3. A test that respects the overlap. #119 wants a test behind each chart, and #124 rules out independent-sample tests here, rightly. The fit is a within-month randomisation test: draw the same number of days from each month as were fished, 5,000 times with a fixed seed, and see how often the gap is as large. On the real data:
The rain gap sits mostly in the heaviest days: 40 mm or more fell on 2.5% of fieldwork nights against 3.7% of days in the same months. The copy calls this coverage, not weather stopping trips, as #124 asks. 4. Smaller fixes
Merging with #151 and #152. A trial merge of all three is clean and passes Checks after the fixes:
|
Adds a nursery/month selector on /effort and paired distributions of daily rainfall, daily maximum wind and OISST on sampling dates versus all available dates in that same month. Repeat sets on one date count once. Both groups use identical daily measurements; missing values and group denominators are shown and exported.
Closes #124. Uses per-stratum comparisons rather than pooling months or nurseries. The reference includes sampled dates, so these are descriptive charts without independent-sample significance tests.
Validation: lint, svelte-check (0 errors/warnings), 87 unit tests, read-only real-data import, production build, and 32 Playwright tests including the new mobile and light/dark accessibility check. Browser tests used an ignored local config to isolate their server port from other active checkouts. No private data or local config committed.