OpenDataVisualizer/README.md
Claudio Schaad 7b65926aa2 Add Thurgau traffic visualizer and start page (#1)
- Thurgau hourly traffic counts (data.tg.ch) refreshed every 6 h into a per-day JSON cache
- Road geometry per station direction from swisstopo swissTLM3D; roundabout arms run outward from the roundabout centre
- Leaflet map with animated vehicles by class, time controls and base map switcher (grey, colour, aerial)
- Station panel with per-class counts and Chart.js charts
- Start page with map tiles; traffic map at /verkehr/thurgau
- Dockerfile and docker-compose, xUnit tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claudio Schaad <c.schaad@pog.ch>
Co-committed-by: Claudio Schaad <c.schaad@pog.ch>
2026-11-06 20:17:26 +00:00

1.2 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.

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.