Visualization for opendata.swiss
Find a file
Claudio Schaad 05f4fa78f6 Add live weather layer from MeteoSwiss stations
- 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>
2026-11-19 06:04:15 +01:00
.claude Add Thurgau traffic visualizer and start page (#1) 2026-11-06 20:17:26 +00:00
client Add live weather layer from MeteoSwiss stations 2026-11-19 06:04:15 +01:00
docs Add live weather layer from MeteoSwiss stations 2026-11-19 06:04:15 +01:00
Schaad.OpenData.Hydrology Add live water layer from BAFU hydrology data (#6) 2026-11-18 19:41:23 +00:00
Schaad.OpenData.Server Add live weather layer from MeteoSwiss stations 2026-11-19 06:04:15 +01:00
Schaad.OpenData.Tests Add live weather layer from MeteoSwiss stations 2026-11-19 06:04:15 +01:00
Schaad.OpenData.Traffic Add Thurgau traffic visualizer and start page (#1) 2026-11-06 20:17:26 +00:00
Schaad.OpenData.Vehicles Add Thurgau vehicle stock map (#3) 2026-11-06 21:43:23 +00:00
Schaad.OpenData.Watercraft Add Thurgau watercraft map (#2) 2026-11-06 21:10:01 +00:00
Schaad.OpenData.Weather Add live weather layer from MeteoSwiss stations 2026-11-19 06:04:15 +01:00
.dockerignore Add Thurgau traffic visualizer and start page (#1) 2026-11-06 20:17:26 +00:00
.gitignore Add Thurgau traffic visualizer and start page (#1) 2026-11-06 20:17:26 +00:00
CLAUDE.md Add live weather layer from MeteoSwiss stations 2026-11-19 06:04:15 +01:00
Directory.Build.props Add Thurgau traffic visualizer and start page (#1) 2026-11-06 20:17:26 +00:00
Directory.Packages.props Add Thurgau traffic visualizer and start page (#1) 2026-11-06 20:17:26 +00:00
docker-compose.yml Add Thurgau traffic visualizer and start page (#1) 2026-11-06 20:17:26 +00:00
Dockerfile Add live weather layer from MeteoSwiss stations 2026-11-19 06:04:15 +01:00
LICENSE Initial commit 2026-11-06 18:41:39 +00:00
OpenDataVisualizer.sln Add live weather layer from MeteoSwiss stations 2026-11-19 06:04:15 +01:00
README.md Add dataset docs, source credits and run script (#4) 2026-11-09 18:17:33 +00:00
run.ps1 Add dataset docs, source credits and run script (#4) 2026-11-09 18:17:33 +00:00

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

Road vehicles in the canton of Thurgau

The third visualization shows all road vehicles registered in Thurgau per municipality (Strassenfahrzeugbestand nach Fahrzeuggruppe, Fahrzeugart, Marke und Politischer Gemeinde ab 2023, CC BY 4.0), combined with the resident population per municipality from the Thurgau statistics office:

  • choropleth map of the 80 municipalities (outlines from swisstopo swissBOUNDARIES3D): vehicles per 1000 inhabitants for all vehicles or one vehicle group, or the share of a car brand among all passenger cars
  • year controls to compare or play through the years, with a colour scale that stays fixed across years
  • panel for the canton or a municipality: change against the previous year, population, density and rank, vehicle groups, most common car brands and vehicle types, trend over all years

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.

Without Docker (needs Node.js and the .NET 10 SDK), build the client and start the server with

.
un.ps1

and open http://localhost:5080. -SkipClient starts the server without rebuilding the client.

Where each dataset comes from and how it is downloaded and refreshed is described in docs/datasets.md, with one page per dataset in docs/datasets/.

For development see CLAUDE.md.