Add live weather layer from MeteoSwiss stations #7

Merged
clayschaad merged 1 commit from feature/weather-layer into main 2026-11-19 05:04:46 +00:00
Owner

Live weather data from MeteoSwiss as a new layer on the combined map.

Changes

  • New project Schaad.OpenData.Weather (same pattern as Hydrology):
    • MeteoSwissClient reads {abbr}/ogd-smn_{abbr}_t_now.csv for the five SwissMetNet stations in Thurgau (GUT, STK, BIZ, TAE, HAI; configurable via Weather:Stations) every 10 minutes, and the Latin-1 station list ogd-smn_meta_stations.csv once a day.
    • Backfill: when a station has less than 6 days (or a gap over 20 h), the yearly _t_recent.csv (~6 MB) is streamed once and only the last 7 days are kept; max once per hour per station.
    • History as JSON per day (weather/thurgau/days/…, 60 days); a failing station does not stop the others.
  • API: /api/weather/meta, /stations (current values, 1 h/24 h rain, sunshine, 24 h min/max temperature, strongest gust), /stations/{abbr}/history?tage=7.
  • Combined map: layer "Wetter (live)" – station badges for temperature, 24 h rain or wind, wind arrow pointing downwind, rain marker for the last hour; station panel with values and hourly 7-day chart (temperature line, rain bars); temperature range, wettest station and strongest gust in the overview; weather stations in "In dieser Gemeinde"; MeteoSchweiz credit in the footer.
  • Wiring: solution, server and test references, appsettings.json, Dockerfile.
  • Docs: docs/datasets/wetter.md, overview diagram and table in docs/datasets.md, CLAUDE.md.

Testing

  • dotnet test: 113 passed (13 new: CSV parsing incl. Latin-1 metadata and UTC timestamps, storage, refresher incl. backfill and failing stations, analysis).
  • npm run typecheck and npm run build pass.
  • Checked in the browser against live data: all five layers together without console errors, 1007 points per station after backfill, wind arrows, station panel chart, overview and municipality context.

🤖 Generated with Claude Code

Live weather data from MeteoSwiss as a new layer on the combined map. ## Changes - **New project `Schaad.OpenData.Weather`** (same pattern as Hydrology): - `MeteoSwissClient` reads `{abbr}/ogd-smn_{abbr}_t_now.csv` for the five SwissMetNet stations in Thurgau (GUT, STK, BIZ, TAE, HAI; configurable via `Weather:Stations`) every 10 minutes, and the Latin-1 station list `ogd-smn_meta_stations.csv` once a day. - Backfill: when a station has less than 6 days (or a gap over 20 h), the yearly `_t_recent.csv` (~6 MB) is streamed once and only the last 7 days are kept; max once per hour per station. - History as JSON per day (`weather/thurgau/days/…`, 60 days); a failing station does not stop the others. - **API:** `/api/weather/meta`, `/stations` (current values, 1 h/24 h rain, sunshine, 24 h min/max temperature, strongest gust), `/stations/{abbr}/history?tage=7`. - **Combined map:** layer "Wetter (live)" – station badges for temperature, 24 h rain or wind, wind arrow pointing downwind, rain marker for the last hour; station panel with values and hourly 7-day chart (temperature line, rain bars); temperature range, wettest station and strongest gust in the overview; weather stations in "In dieser Gemeinde"; MeteoSchweiz credit in the footer. - **Wiring:** solution, server and test references, `appsettings.json`, Dockerfile. - **Docs:** `docs/datasets/wetter.md`, overview diagram and table in `docs/datasets.md`, CLAUDE.md. ## Testing - `dotnet test`: 113 passed (13 new: CSV parsing incl. Latin-1 metadata and UTC timestamps, storage, refresher incl. backfill and failing stations, analysis). - `npm run typecheck` and `npm run build` pass. - Checked in the browser against live data: all five layers together without console errors, 1007 points per station after backfill, wind arrows, station panel chart, overview and municipality context. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
clayschaad added 1 commit 2026-11-19 05:04:31 +00:00
- New Schaad.OpenData.Weather project: MeteoSwissClient reads the
  10-minute CSV of the five SwissMetNet stations in Thurgau every 10
  minutes (station list once a day) and backfills the last 7 days from
  the yearly file when the cache has less than 6 days
- History kept as JSON per day (60 days); a failing station does not
  stop the others
- API: /api/weather/meta, /stations (current values, 1 h/24 h rain,
  24 h min/max, strongest gust), /stations/{abbr}/history
- Combined map: "Wetter (live)" layer with station badges (temperature,
  24 h rain or wind), wind arrows, rain marker, station panel with
  hourly 7-day chart, overview and municipality context entries
- Docs: docs/datasets/wetter.md, overview in docs/datasets.md,
  CLAUDE.md; Docker and appsettings wiring

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clayschaad merged commit bd2981ffb8 into main 2026-11-19 05:04:46 +00:00
clayschaad deleted branch feature/weather-layer 2026-11-19 05:04:46 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: clayschaad/OpenDataVisualizer#7
No description provided.