What Is a Practical Exercise for Reading GTFS Stop Times?
From the earlier reference collection. Read the current software blog.
Trace a single trip from its stop-time rows to its service calendar, then use the exercise to practice sequence, date, and overnight-time interpretation.
Choose one trip and its service
A useful first exercise is deliberately small: choose one trip ID, find its trip record, note its service_id, and then collect the stop_times rows for that trip. The GTFS reference describes the dataset as files of records and fields, with stop_times.txt and calendar files among its components. [GTFS schedule reference](https://gtfs.org/documentation/schedule/reference/)
Do not begin by loading every route into a map. A single trip makes it easier to understand how the files link together and to notice what each row means before adding more data.
Trace the stop sequence
For each row, write down the stop sequence, stop identifier, arrival time, and departure time when present. Sort by the trip’s sequence field rather than assuming file row order is meaningful. Check that the resulting order follows the trip’s stated progression and that scheduled times do not unexpectedly move backward.
For example, a three-stop trip might list a terminal departure at 08:10, an intermediate arrival at 08:24 and departure at 08:25, and a final arrival at 08:41. The one-minute difference at the middle stop illustrates why arrival and departure are separate scheduled events.
Connect the trip to a date
Next, use the trip’s service_id to inspect the recurring calendar and any date-specific exceptions. Pick a date inside the calendar coverage and determine whether the weekday service is active. Then pick a date with an exception, if the dataset provides one, and see how that changes the answer.
If one time is 25:10:00, calculate it as 25 hours and 10 minutes after the service-day start. It corresponds to 01:10 on the next calendar date, while the trip may still be selected by the prior service date. Keep both dates in your notes.
Write down the result
Finish with a compact explanation: which trip you followed, the ordered stop events, and the service date on which the trip is active. Note any missing arrival or departure values without filling them in unless the applicable data rules allow that interpretation. Compare your result with a rider-facing display and investigate any discrepancy.
This exercise practices the most important habit in schedule work: follow identifiers across files and keep event time separate from service-calendar logic. Once the single trip is clear, repeat the process with a holiday exception or an overnight trip to extend the example.