Repository navigation
Charts: nursery month-hour temperature calendars - #136
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Colour scale: one domain for every nursery, taken from the supported cells in whole degrees (24–33 °C now). On 15–40 °C the lagoon's month-hour means (24.7–32.2 °C) used two or three of the seven colour steps, so the daily and seasonal pattern barely showed. The legend shows the domain. - Heatmap: empty cells are dashed outlines, not a pale fill. In dark mode the old fill (--surface-2) matched the coolest colour (--seq-1). - Each nursery's logged days and period under its chart, since coverage ranges from 199 days to about 2,500. - Section moved below the logger overview; MONTH_NAMES reused; no aria-label on the legend (the swatches are decorative, the end labels are text). - AGENTS.md note moved from "Cloud cover" to "Temperature loggers". - Merged main, which drops the IMPORTER_VERSION bump (no import change here). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Luen
left a comment
There was a problem hiding this comment.
Reviewed against the real logger data (aggregates only) and current main. The data handling is right:
logger_diel.nreally is contributing days.import/insitu.tsadds one nursery-wide hourly mean per day that meetsMIN_DAY_HOURS, so the ten-day mask and the "Contributing days" column mean what they say.- Month and hour order, local time, the CSV and table, and keyboard access all work.
I pushed fixes in 0ba67bf, after merging main in 42e582e.
1. The 15–40 °C scale hid the pattern. Across the 12 nurseries, the supported month-hour means run from 24.7 to 32.2 °C. The heatmap has seven colour steps, about 3.6 °C each on 15–40, so every nursery used only steps 3–5, and most used just two. The daily cycle and the seasons barely showed. The scale is still the same for every nursery, as #127 asks, but now comes from the supported cells in whole degrees: 24–33 °C on the current data, about 1.3 °C a step. The legend shows that range.
2. Empty cells looked like cool cells in dark mode. An empty cell was --surface-2 (#16243a) at 60%, against --seq-1 (#132a49) for the coolest values. With the narrower scale, the coolest cells use --seq-1. Empty cells are now dashed outlines with no fill, in Heatmap.svelte, which covers #127's "missing cells are visually different from cool cells". The same change helps the other heatmaps: the empty cells on /effort are now clear in dark mode.
3. Coverage per nursery. Nurseries were logged for very different spans, from 199 days (Intercontinental, Nov 2015 to Jun 2016) to about 2,500. Each chart's subtitle now gives its logged days and period, for #127's "disclose differing observation periods".
4. Smaller fixes
IMPORTER_VERSION: the bump isn't needed, because there's no import change here. Mergingmain(already at 9 for #138) drops it from the diff.- AGENTS.md: the note was in the middle of "Cloud cover (#104)", splitting its list. It now sits under "Temperature loggers (#10)" and describes the new scale.
- Placement: the section moves below the logger overview, so the page opens with the overview and then this nursery-by-nursery view.
- Legend:
aria-labelis off the legend div. The swatches are hidden from screen readers and the end labels are text. AGENTS.md keepsaria-labelfor links. - Months: the component reuses
MONTH_NAMES. - Copy: the caveats are in plainer words, with the same content.
Not done. The optional anomaly mode from #127 (deviation from each nursery-month mean). It's fine to leave it for a follow-up.
Checks after the fixes: pnpm lint, pnpm check and pnpm test (92 passed). pnpm build and pnpm test:e2e (32 passed, including the calendar test). I checked /water-quality on the real data in light and dark, plus the other heatmap pages (/drivers, /effort, /nurseries, /pressure, /recaptures, /tides). There were no console errors.
Adds a nursery selector and month-by-hour historical temperature heatmap to /water-quality. Cells require ten observed days, use the same 15–40 °C scale across nurseries, and export contributing-day counts alongside temperatures. Copy explains unequal coverage and the limits of pooled means.
Closes #127.
Validation: pnpm lint; pnpm check; pnpm test (81 passed); opt-in real-data import test; production build; Playwright (32 passed, including mobile, keyboard and both-theme axe checks). Real-data support checked in aggregate. No source spreadsheets changed or included.