SBB trains delay

Christopher Hogendijk
5 min readAug 26, 2019

--

The Swiss Federal Railways (SBB) is the national rail company of Switzerland. Despite the tough topography of the country (right in the middle of the Alps), the swiss rail system is well developped and famous for its bridges, tunnels and punctuality. Most people who travel for the first time in Switzerland with the train and experience a few minutes delay are often amazed to hear the “Trainchef” in the speaker publicily appologizing for the delay and giving a reason for it. In fact, above 3 minutes of delay, a train is officially considered “delayed” in Switzerland.

The SBB publishes a lot of publicly available datasets, one of them called ist-daten (actual data) and collecting information on trains and their punctuality on a daily basis. This article digs into this dataset any ask questions such as : How many trains long-distant trains travel per year in the country ? What’s the most frequented station ? Is the most frequented station also the one with most delays ?

SBB open data —ist-daten dataset

The open data platform of SBB contains lots of different types of data about rails, real estate projects they are running, infrastructure, trains and traffic information. The ist-daten dataset (actual data) contains status about almost every public transport journey in the country (ferries, bus, trains) and is updated once per day. By every journey, is meant every “stop” made by a public transport mean.

The first information provided by the dataset is that there are approximatively 1.6 millions unique “stops” per day in Switzerland. Stops have scheduled departure and arrival times, and get actual departures and arrivial times once effectuated (the status). This information is typically available and displayed in most of the train stations in Switzerland.

Let’s have a look at the distribution of the “stops” per transport type on a random weekday.

We discover that trains encounter for about 10% of the total stops made by public transport. Let’s keep only the trains stops and have a look at the distribution of their operator.

Approximatively 40% percents of commercial train stops in Switzerland are operated by SBB. The rest are either regional or foreign operators (such as the french TGV by SNCF or ICE by Deutsche Bahn).

If we continue narrowing our search and continue with only SBB operated train, and have a look at the distribution of the types of trains :

More than 70% of stops are encountered for the so called S-Bahn. This makes a lot of sense since they operate at a more regional level and typically make much more frequents than long-distant trains. In this analysis the focus is set on the long-distant traffic (Fernverkehr) of SBB :

  • IC (interCity)
  • IR (InterRegio)
  • RE (RegioExpress)

This consists of roughly eleven thousands stops per day, from the lines to be seen on the map just below.

SBB long-distant traffic

Original pdf file to be found here.

SBB trains delay

The ist-daten datasets have been collected for an entire year for the period from the 1st of July 2018 to the 30th of June 2019. The initial 365 daily files of ~500 MB each got processed to obtain 3.6 millions entries, with delay information for every “stop” of IC, IR and RE trains.

Let’s have a look at the absolut number of trains delayed per hour, making the distinction between weekdays and weekends.

Without surpise, the morning and evening rush of commuters corresponds to the times in the day with the highest absolut numbers of delay. The peaks are very pronounced during the week, while they are a bit shifted during the weekends.

The same data in percentage terms with a yearly outlook delivers :

Again, one can observe a weekly pattern, with higher percentage of delays during the working days. It’s also interesting to see that delays are less frequent during school holidays, such as christmas and summer holidays, and this eventhough the number of trains increases (at least for the summer period, from July to mid-August). During bad days, up to 20% of all trains are affected by delays.

Next plot is showing the daily number of trains in the top 20 train stations of Switzerland.

Zurich is by far the most frequented station, followed by Olten (not well known abroad but offen referred as the rail node of Switzerland) and 4 other major cities of the country : Bern, Basel, Lausanne and Geneva.

The next graph aims at analyzing the frequency of delayed trains per stations.

Bern and Olten are leading the rankings, with about 11% of trains arriving at least 3 minutes late. On the other side of the ranking is Saint-Gallen, at the very north-east of Switzerland. Bern and Olten are important nodes of the swiss railway system, with tracks coming from several directions. That could certainly explain a bit this observation. One can also notice that Zurich main station (Zürich HB), despite beeing by far the most frequenced stations has only about 6% of trains delay. Let’s not forget that all these observations were made with the long-distance trains only.

In this very short blog we’ve learned that 3.6 millions stops were made by long-distant trains in Switzerland every year. Zurich main station was rather little affected by delays, although by far the most frequented stations in terms of long-distant trains. On the other hand, Berns and Olten, two rail nodes in the middle of the country appeared to get ~11% of their trains delayed, vs only ~6% for Zurich.

The article was in no way intended to blame SBB for their delays. On the contrary. As a happy daily commuter and defender of public transport, I intended to show a few statistics that can be highlighted with the ist-daten dataset and perhaps motivate some peers to conduct deeper analysis with this open data platform.

--

--