fulldecent commited on
Commit
bffba5e
·
verified ·
1 Parent(s): 3954c1c

Initial check-in for data card

Browse files
Files changed (1) hide show
  1. README.md +98 -0
README.md ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - septa
7
+ - transit
8
+ - on-time-performance
9
+ - public-transit
10
+ - time-series
11
+ - philadelphia
12
+ - gtfs
13
+ - gtfs-rt
14
+ pretty_name: SEPTA Regional Rail on-time performance
15
+ ---
16
+
17
+ # SEPTA Regional Rail train lateness dataset
18
+
19
+ **Entriken, W. (2026).** *SEPTA Regional Rail On-Time Performance Report [data set].* https://apps.phor.net/septa/
20
+
21
+ This dataset contains every observed change in lateness for SEPTA Regional Rail trains, collected continuously since 2008. It is the most complete public record of actual train performance on the SEPTA Regional Rail network.
22
+
23
+ ## Dataset description
24
+
25
+ The data tracks **real-time lateness** of every train on the SEPTA Regional Rail system. Records are generated only when the reported lateness changes, making the dataset efficient while preserving complete performance history.
26
+
27
+ ### Columns
28
+
29
+ | Column | Format | Description |
30
+ | -------------- | ---------- | ------------------------------------------------------------ |
31
+ | `service_date` | YYYY-MM-DD | The **service day** in SEPTA parlance (the operational day the trip belongs to). |
32
+ | `time` | HH:MM:SS | The time of the observation in Philadelphia local time. |
33
+ | `train_number` | string | The head number displayed on the train for that specific trip. |
34
+ | `lateness` | int32 | Seconds late (positive = late, 0 = on time, 999 = train unexpectedly removed from service). |
35
+
36
+ ### Service day and time handling
37
+
38
+ SEPTA resets its service day each night at **3 AM**.
39
+
40
+ If a trip starts at 4 AM on Tuesday and ends at 2 AM the following morning, the **entire trip counts for Tuesday’s service day**. The `service_date` + `time` together give the exact moment of each observation.
41
+
42
+ For example, `(2026-01-01, 00:15:00)` occurs after `("2026-01-01, 23:59:00)`.
43
+
44
+ ### Train numbering and historical context
45
+
46
+ Each `train_number` corresponds to a single head sign and its route always touches the “trunk” (30th Street Station, Suburban Station, Jefferson Station).
47
+
48
+ Since the **Center City Commuter Connection** opened in November 1984, trains run through Suburban Station: inbound on one side of the city and outbound on the other.
49
+
50
+ Note: Any station visited after exiting trunk from the Jefferson Station side is called "north"; any station after exiting trunk the other direction is called "south". See the physical map of the track branching directly east of Jefferson Station to understand why. For example, West Trention line stops are "north", but Trenton line stops are "south". Trains heading towards a "north" terminal station are "northbound"; all others are "southbound". This "north" / "south" / "northbound" / "southbound" wording is outdated since the 1984 merger of the Reading and Pennsylvania railroads since trains now pass through Suburban Station. But as of 2026 it is still in frequent use by SEPTA rail staff and is in SEPTA's GTFS data feeds.
51
+
52
+ **Key invariant (unchanged since 1984):**
53
+
54
+ Every trip touches Suburban Station, and every line respects strict monotonic ordering. This allows reliable topological sorting when linking to GTFS schedules (see [example implementation](https://github.com/fulldecent/septa-regionalrail-otp/blob/eb0ccd2b73a46c426380ca3234e999b6f2af068a/website/common.php#L393-L421)).
55
+
56
+ ### Lateness definition
57
+
58
+ `lateness` is SEPTA’s official recording of how many minutes late the train was at its **most recent control station**, adjusted forward if more than the allotted time has passed to the next control station.
59
+
60
+ As of 2015, control stations included interlocking/switching points, wayside stations, and visual inspection points; some lines now use GPS.
61
+
62
+ **Important notes on collection**:
63
+
64
+ - Data is polled from the public [SEPTA TrainView API](https://www3.septa.org/api/TrainView/) (and its predecessors) every minute since 2009.
65
+ - Since ~2015 the API updates every ~3 minutes, so recorded values are accurate to within ~60 seconds.
66
+ - A new row is written **only when lateness changes**. If the train stays at the same lateness value, no duplicate row is stored.
67
+
68
+ ### On-Time Performance (OTP) calculation
69
+
70
+ SEPTA defines a train as **on time** if:
71
+
72
+ - Inbound: it reaches Suburban Station early or within **359 seconds (5 min 59 sec)** of scheduled arrival.
73
+ - Outbound: it reaches its terminal station early or within 359 seconds of scheduled arrival.
74
+
75
+ Almost every train number contributes to the monthly OTP of two service lines (i.e. once inbound and once outbound; one "north" line and one "south" line).
76
+
77
+ Planned service interrputions published in advance do not count towards the numerator. Unplanned service interruptions, such as cancelled trains, count like any other not on-time train.
78
+
79
+ ### Limitations
80
+
81
+ - Occasional gaps may exist due to API outages or data-feed limitations.
82
+ - Lateness is based on SEPTA’s control-point reporting (not always GPS).
83
+
84
+ ### Intended uses
85
+
86
+ - Transit planning and schedule optimization (see [our past successful proposals](https://github.com/fulldecent/septa-regionalrail-otp/tree/main/SEPTA%20meetings%20and%20reports))
87
+ - Time-series forecasting and delay prediction
88
+ - Machine-learning research on public-transit reliability
89
+ - Civic advocacy
90
+
91
+ ### How to load (Hugging Face `datasets`)
92
+
93
+ ```python
94
+ from datasets import load_dataset
95
+
96
+ ds = load_dataset("fulldecent/septa-regionalrail-otp", split="train")
97
+ ```
98
+