Skip to content

Instantly share code, notes, and snippets.

@firestack
Last active February 19, 2025 17:05
Show Gist options
  • Select an option

  • Save firestack/35abb2ab9364219fb90a5480a800d651 to your computer and use it in GitHub Desktop.

Select an option

Save firestack/35abb2ab9364219fb90a5480a800d651 to your computer and use it in GitHub Desktop.

Finding Trips that visit the same stop twice

This notebook provides an example from GTFS data of GTFS Trips which visit a stop twice. At the very bottom of the notebook is a table which has the output for MBTA's GTFS at an earlier time.

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@firestack
Copy link
Author

stop_id stop_name total_stops stop_sequences route_id trip_headsign route_pattern_id shape_id representative_trip_id
57400 Maverick 2 18,28 120 Maverick via Jeffries Point 120-3-1 1200168 67203034
8964 W Milton St @ Ernest Ave 2 38,39 33 River St & Milton St 33-1-0 33-1-0 67251086
838 Lagrange St @ Vermont St 2 4,13 37 Avenue Louis Pasteur via Forest Hills 37-B-1 370143-1 67251195_1
3125 North Quincy 2 47,53 217 Quincy Center via North Quincy 217-1-0 2170130 67290097
4023 Granite St @ Davis Rd 2 33,36 238 Avon Square 238-3-0 2380242 67290602
4023 Granite St @ Davis Rd 2 33,36 238 Holbrook/Randolph 238-9-0 2380243 67290605
4023 Granite St @ Davis Rd 2 33,36 238 Crawford Square 238-7-0 2380241 67290864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment