# Calculate average route headways
headways_by_route <- get_headways(gtfs = for_rail_gtfs, method = "by.route")
# Calculate hourly headways
headways_by_hour <- get_headways(gtfs = for_rail_gtfs, method = "by.hour")
# Calculate headways for each trip
headways_by_trip <- get_headways(gtfs = for_rail_gtfs, method = "by.trip")
# Calculate headways for each stop
headways_by_stop <- get_headways(gtfs = for_rail_gtfs, method = "by.stop")
# Calculate headways for each shape
headways_by_shape <- get_headways(gtfs = for_rail_gtfs, method = "by.shape")
# Calculate detailed stop-level headways
detailed_headways <- get_headways(gtfs = for_rail_gtfs, method = "detailed")
Run the code above in your browser using DataLab