## 2 Data
### Data Handling  
Data handling consisted of cleaning the data and combining both aforementioned data sets into one data set holding information on both scheduled and actual dwell times, as well as information on passenger volumes. To accurately use the APC data, we calculated the average number of passengers boarding and alighting during each observation. This step is necessary since the trains in Stockholm are sometimes composed of multiple carriages, and the number of carriages equipped with an APC system per train varies because of this. By taking the average as opposed to the sum of the passenger counts, we avoid extreme values which are a result of multiple cars equipped with the APC system that are present on a single train. The dwell times are the same across these multiple sensors and are thus not affected in this step.  
Several steps were then taken to merge both APC and signalling data. This was required because the APC data only cover the actual dwell times and not the scheduled dwell times. To identify dwell times that took longer than intended, we thus first combined the scheduled dwell time from the signalling data with the appropriate APC observation. This was a complex process because the APC data do not contain information about the train ID, which could have been used as an explicit criterion. Instead, we defined criteria to match observations on both data sets based on the present station and the origin and destination of the trains in both data sets. To make sure that we only made one match between the sets, rather than multiple feasible combinations, we used the one that was closest in time, based on the two sets of timestamps, and required that the difference between these timestamps was no more than 60 s. Once this happened, we had about  
Figure 2: Schematic description of the location of data collection using signals. Adapted from [26].  
719,769 observations where we were confident about the match. The origin and destination stations of each journey were excluded here, as they fall out of the scope of this study.  
Once the APC and signalling data were combined, we applied a correction for early arriving trains across the data before we could calculate dwell time delays. Trains arriving early will have longer dwell times than scheduled, as early departures are prohibited. This difference between the actual and scheduled dwell times is, however, not a delay, as trains must wait longer than scheduled to depart on time. Correcting for early arrivals is a critical step since a substantial portion of trains arrive early, and omitting this step results in an overestimation of the number of delayed trains.  
The final step consisted of selecting the stations of interest and splitting the data set into two groups. Scheduled dwell times in the studied network are typically 42 s long. Longer dwell times are scheduled for stations where activities other than passenger exchange take place, such as crew changes [20]. The scheduled dwell time for some peripheral stations depends on scheduled interactions with other trains. To avoid including those stops, we excluded these peripheral stations as well as the stops where additional activities take place. After this step, we were left with 686,403 matched observations with information on station stops with a scheduled dwell time of both 42 and 120 s. These data were split into two groups since the latter group of stations is characterized by substantially higher passenger volumes. Viewing both types of stops as equal would result in a distorted image of the influence of passenger volumes on delays, especially at higher passenger volumes. Splitting the data did not affect the total number of observations.