OpenDataVisualizer/README.md
Claudio Schaad a082eafdad Add Thurgau watercraft map
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>
2026-11-06 21:49:32 +01:00

2.1 KiB

OpenDataVisualizer

Visualization for opendata.swiss.

Traffic in the canton of Thurgau

The first visualization shows the hourly traffic counts of the canton of Thurgau (Verkehrszähldaten motorisierter Individualverkehr nach Fahrzeugklassen, CC0):

  • animated map: vehicles drive along the real road in both directions of each counting station, the dot density follows the hourly count and the colour the vehicle class
  • time controls to play through a day or jump to any hour
  • station panel with the counts per vehicle class, hourly values, average weekday/weekend profile, daily totals and class distribution

Road geometry comes from swisstopo (swissTLM3D), the base map from swisstopo as well.

Watercraft in the canton of Thurgau

The second visualization shows the boats registered with the Thurgau navigation authority (Bestand der bei der Schifffahrtskontrolle des Kantons Thurgau immatrikulierten Wasserfahrzeuge, CC BY 4.0), all yearly datasets from 2021 on:

  • map with one donut per harbour location on Bodensee, Untersee and Rhine, sized by the number of boats and split by type, propulsion, fuel, emission standard or special use; categories can be hidden via the legend
  • year controls to compare or play through the years
  • panel for the canton or a location: change against the previous year, median length and power, share requiring a licence, category table, trend over all years, length and power distribution

Run

docker compose up --build

Then open http://localhost:8080. On the first start the app downloads the data from data.tg.ch and builds the road geometry (one to two minutes); it is cached in the opendatavisualizer-data volume and refreshed every six hours. Since data.tg.ch only serves the last two weeks, the cache keeps growing over time.

For development see CLAUDE.md.