Method
The question
Do trains, buses and trams arrive later in rain, snow, storms, frost or heat? To find out, we link every measured arrival in Swiss public transport with the weather measured at the planned arrival time at the nearest weather station.
Data
- Arrivals: opentransportdata.swiss actual data, every arrival of every operator with planned and actual time. Only arrivals with a measured time count (status “REAL”), without pass-throughs. On time means less than 3 minutes after schedule, as at SBB, but not weighted by passengers.
- Weather: MeteoSwiss Open Data (CC BY 4.0), hourly values from about 160 automatic SwissMetNet stations and about 140 additional automatic precipitation stations: precipitation (hourly total), air temperature at 2 m (mean and maximum), gust peak, automatic snow depth. Timestamps are UTC and mark the end of the hour. We checked this against the 10-minute values and convert to Swiss local time, including the clock change.
- Stops: coordinates and height from the atlas service point directory. The two-digit platform suffix of the BPUIC is removed, so bus and tram platforms find their stop.
Which station for which stop
Each stop gets three stations. For rain, the nearest station that measures precipitation (at most 20 km). For temperature and wind, the nearest SwissMetNet station (at most 25 km). For snow depth, the nearest station that measures it (at most 25 km). So that a valley stop is not matched with a summit, height difference counts: 100 m weigh like 2 km of distance, and more than 400 m of difference (snow 300 m, rain 700 m) rules a station out. Stops without a suitable station, mostly abroad, get no weather. The rain station is a little over 5 km away on average. Rain is local, and a shower can fall differently between station and stop. This blurs effects rather than creating them.
What counts as rain, snow, storm …
- Rain: at least 0.5 mm in the hour. Dry: 0 mm in this hour and the one before, so wet roads after a shower don’t count as dry. Four levels: drizzle 0.1–0.4 mm, light 0.5–1.9, moderate 2–4.9, heavy 5 mm or more.
- Snowfall: at least 0.3 mm of precipitation at 1 °C or colder. This is an approximation, because the stations don’t tell rain from snow directly. Compared with dry hours.
- Snow on the ground: at least 5 cm of snow depth at the snow station, compared with 0 cm.
- Storm gusts: gust peak of 17 m/s or more (61 km/h, Beaufort 8), compared with hours below 10 m/s (36 km/h).
- Frost: −2 °C or colder, compared with hours of 3 °C or more. Heat: hourly maximum of 28 °C or more, compared with 15–25 °C.
Comparing like with like
A plain comparison of wet hours with dry hours would mislead: morning rain differs from evening rain, Ticino from the Plateau, and rush hour is busier on weekdays than on Sundays. So we only compare within groups that differ, as far as possible, only in the weather:
weather station × mode × hour of planned arrival × day type (Monday–Friday, Saturday, Sunday) × calendar week
For snow on the ground, storm, frost and heat we add whether it rained in that hour, so a rainy storm is not compared with dry calm. In every group with at least 30 arrivals without that weather, spread over at least 2 days, we compute the difference in punctuality. These differences are averaged, weighted by the number of arrivals in that weather. The result answers the question: how much more punctual would exactly these trips have been in dry weather? “On time when dry” is therefore not the average of all dry hours but the comparison value for the same places, hours and weeks.
For lines, the line itself is part of the group; for operators, the operator. Each line is compared only with itself. The calendar week removes slow changes such as roadworks, timetable changes or autumn leaves on the tracks. Without the week, more arrivals can be compared, but the comparison is less strict. The result of that variant is shown on the main page.
Weekends: a calendar week has only one Saturday and one Sunday, so within a week they never have both wet and dry comparison days. The main figures therefore cover Monday to Friday. The weekday-versus-weekend comparison is computed without the week match.
How certain is it?
There are millions of arrivals, but they are not independent: rain falls over whole regions, and one disruption affects hundreds of trips. The real sample is the days. So we compute 95% intervals with a bootstrap over whole operating days. In each of 200 replicates (lines, operators, regions: 100), every day is counted zero, one or more times at random (Poisson bootstrap), and the effect is recomputed. If the interval crosses zero, we call the difference “not clear”. Results with fewer than 1,000 arrivals or fewer than 3 days are not shown; below 5 days they are flagged as uncertain.
Rankings of lines are especially prone to chance: small lines often top them by luck. We therefore sort the most sensitive lines by the upper bound of the interval, its cautious end. Lines count as weatherproof when their interval sits most tightly around zero (at least 1,000 arrivals in rain). The table shows all lines with at least 200 arrivals in rain on at least 5 days; the rankings need rain on at least 8 days, and lines that are 99% on time even when dry do not count as weatherproof. As the actual data carries no unique line number, same-named lines of one operator (SBB runs an S1 in Basel, Lucerne, Zug and Vaud, for example) are told apart by the canton where most stops of a journey lie.
What this is not
- Not proof of cause. When it rains, more people use public transport, boarding takes longer and roads are busier. All of that is part of the “weather effect” as travellers experience it. But events that happen to fall on rainy days (accidents, big events) can distort it.
- Weather at the stop, not along the route. A train arriving in sunshine in Geneva may have been delayed in rain near Bern. As rain is usually widespread this matters little, but it blurs effects somewhat for long train runs.
- Short period. Actual data stays online for only about 50 days; we keep collecting it daily. Heat, lowland snow and winter storms only become measurable once they happen within the data period.
- Public holidays are not treated separately; they count as their weekday’s day type.
Updates
Every day around 08:00 the previous day’s actual data and the new MeteoSwiss hourly values are added, and everything is recomputed. The current weather on the main page comes from the 10-minute values and reloads every 10 minutes.
Sources and licence
Actual data and service points: opentransportdata.swiss. Weather: MeteoSwiss, Federal Office of Meteorology and Climatology (CC BY 4.0). Analysis with DuckDB. Every number is available as JSON under “Data” (CC BY 4.0).