Add Thurgau watercraft map #2

Merged
clayschaad merged 1 commit from feature/watercraft-thurgau into main 2026-11-06 21:10:02 +00:00
Owner

Summary

  • New Schaad.OpenData.Watercraft library: finds the yearly datasets of watercraft registered with the Thurgau navigation authority on data.tg.ch (2021–2025, CC BY 4.0) via the catalog, caches them under {DataPath}/watercraft/thurgau and refreshes them daily. A year is downloaded again only if it is new or its dataset id or modified date changed.
  • WatercraftAnalysis groups boats by location and for the whole canton by type, propulsion, fuel, emission standard and special use, plus length and power ranges, medians and how many boats need a licence (> 6 kW or > 15 m² sail).
  • API: /api/watercraft/meta and /api/watercraft/years.
  • New page /schifffahrt/thurgau (optional ?jahr=2023): one SVG donut per harbour location on swisstopo base maps, year controls with playback, legend chips that hide categories, and a panel for the canton or the selected location (change against the previous year, category table, trend over all years, length and power histograms). It also has a tile on the start page.
  • The source has no coordinates. Location positions are fixed shore points (swisstopo gazetteer point snapped to the Bodensee/Untersee shore or onto the Rhine).
  • Swisstopo base layers moved to client/src/map/baseLayers.ts so both maps use them.

Test plan

  • dotnet test: 62 passed (13 new)
  • npm run build (tsc + vite)
  • Checked in the browser: all 5 years imported, markers on the map, location selection, switching dimensions, hiding categories, year playback, no console errors; traffic map still works

🤖 Generated with Claude Code

## Summary - New `Schaad.OpenData.Watercraft` library: finds the yearly datasets of watercraft registered with the Thurgau navigation authority on data.tg.ch (2021–2025, CC BY 4.0) via the catalog, caches them under `{DataPath}/watercraft/thurgau` and refreshes them daily. A year is downloaded again only if it is new or its dataset id or modified date changed. - `WatercraftAnalysis` groups boats by location and for the whole canton by type, propulsion, fuel, emission standard and special use, plus length and power ranges, medians and how many boats need a licence (> 6 kW or > 15 m² sail). - API: `/api/watercraft/meta` and `/api/watercraft/years`. - New page `/schifffahrt/thurgau` (optional `?jahr=2023`): one SVG donut per harbour location on swisstopo base maps, year controls with playback, legend chips that hide categories, and a panel for the canton or the selected location (change against the previous year, category table, trend over all years, length and power histograms). It also has a tile on the start page. - The source has no coordinates. Location positions are fixed shore points (swisstopo gazetteer point snapped to the Bodensee/Untersee shore or onto the Rhine). - Swisstopo base layers moved to `client/src/map/baseLayers.ts` so both maps use them. ## Test plan - [x] `dotnet test`: 62 passed (13 new) - [x] `npm run build` (tsc + vite) - [x] Checked in the browser: all 5 years imported, markers on the map, location selection, switching dimensions, hiding categories, year playback, no console errors; traffic map still works 🤖 Generated with [Claude Code](https://claude.com/claude-code)
clayschaad added 1 commit 2026-11-06 21:08:44 +00:00
New Schaad.OpenData.Watercraft library that discovers the yearly
"immatrikulierte Wasserfahrzeuge" datasets (2021–2025) on data.tg.ch,
caches them and aggregates boats per harbour location by type,
propulsion, fuel, emission group and use, with length/power bins.

API under /api/watercraft, new page /schifffahrt/thurgau with donut
markers per location, year playback, toggleable categories and a
location/canton panel. Swisstopo base layers moved to map/baseLayers.ts
for both maps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clayschaad merged commit 39a62255af into main 2026-11-06 21:10:02 +00:00
clayschaad deleted branch feature/watercraft-thurgau 2026-11-06 21:10:02 +00:00
clayschaad referenced this pull request from a commit 2026-11-06 21:10:02 +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#2
No description provided.