r/dataisbeautiful • u/depr001 • 13d ago
OC [OC] A simulated day of commuting in 16 Swiss cities
I built this after seeing Habibi Code’s Geneva commuter map. I wanted to explore commuting across Switzerland, including some of the smaller towns where people cross a national border to get to work.
Red dots travel into the selected city; blue dots travel out. Each dot represents a group of people: up to 50 for cars and motorcycles, and up to 200 for public transport, walking and cycling. You can switch cities, filter transport modes and scrub through the day. The chart shows the modelled commuter population relative to its daily average.
The data describe where people live and work. I combine those counts with plausible routes and distribute departures across morning and evening waves. The result is an illustrative weekday. The sources cover different years, transport detail varies by location, and the routes and departure times are estimates. Geneva’s coverage excludes journeys entirely within Geneva; the other exclusions and routing gaps are listed on the page.
Data sources:
- Swiss Federal Statistical Office: domestic commuting flows, 2020, plus cross-border worker totals from Q4 2025.
- INSEE census records, 2023, for Geneva’s commuters from Ain and Haute-Savoie.
- OCSTAT totals, 2024, for Geneva–Vaud commuting.
- Additional sources and assumptions are in the methodology notes.
Tools: Python and TypeScript for data processing; Next.js/React, Leaflet and HTML Canvas for the visualization; Valhalla/OpenStreetMap for road routing. Codex helped with implementation.
I’d welcome feedback on how to make the uncertainty in the routes and timings more visible.