| get_speeds | R Documentation |
Combines distance in meters and duration in seconds to calculate kilometers per hour.
get_speeds(gtfs, method = "by_trip", trips = "all")
gtfs |
A GTFS object. |
method |
One of '"by_trip"', '"by_route"', or '"detailed"'. Legacy dotted values remain accepted. |
trips |
Character trip IDs or '"all"'. |
Detailed distances are straight-line geodesic distances between stops. Route and trip distances follow 'shapes.txt', or inferred straight-line shapes if the feed has none.
A tibble with 'average.speed' for route and trip methods, or segment-level 'speed' for the detailed method. 'direction_id' is retained when available.
[GTFSwizard::get_distances()], [GTFSwizard::get_durations()]
get_speeds(for_rail_gtfs, "by_route")
get_speeds(for_rail_gtfs, "by_trip")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.