| get_headways | R Documentation |
Calculates elapsed minutes between successive service instances. Frequency based trips are expanded according to 'frequencies.txt'.
get_headways(gtfs, method = "by_trip")
gtfs |
A GTFS object. |
method |
One of '"by_trip"', '"by_route"', '"by_hour"', '"by_stop"', '"by_shape"', or '"detailed"'. Legacy dotted values remain accepted. |
Route, hour, and trip methods compare first departures. Stop and detailed methods compare arrivals at the same stop, route, direction, and service pattern. The first service instance in each group has no headway and is omitted.
A tibble. Headway values are always returned in 'headway_minutes'; 'valid_trips' is the number of intervals summarized.
[GTFS Schedule Reference](https://gtfs.org/documentation/schedule/reference/#frequenciestxt)
[GTFSwizard::get_frequency()]
get_headways(for_rail_gtfs, "by_route")
get_headways(for_rail_gtfs, "by_hour")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.