HCTG GTFS Workshop
Useful links
Tutorial Files
Download GTFS files for your local transit system (a good directory of transit feeds is Transitland, linked above) and place them in gtfs/, replacing the files currently in it if applicable. The following are tutorial files which show the process of building a Leaflet map with GTFS data step-by-step:
Potential Next Steps
- Show overlapping transit routes in some way? (the current popup only shows the route on the “top-most layer” of the map, i.e. the one which was added last to the map)
- Plot stops/stations on the map?
- Display schedules for routes and/or stops?
- Read the documentation for stop_times.txt
- ADVANCED: Integrate with your transit service’s API or GTFS-RT feed to show real-time vehicle locations and estimated arrival times?
- GTFS Realtime documentation
- Almost all transit agencies with their own “live map” use JSON APIs to fetch vehicle locations and estimated arrival times. Find these APIs using your browser’s network inspector and try to integrate them into your map!