Returns the duration of segments between stops of each specified
A GTFS object as created by
A string vector including the
A string representing the time unit in which the duration is
desired. One of
data.table containing the segments' duration of each
A trip segment is defined as the path between two subsequent stops in the
same trip. The duration of a segment is defined as the time difference
between its arrival time and its departure time, as specified in the
1 2 3 4 5 6 7 8 9 10 11 12
data_path <- system.file("extdata/spo_gtfs.zip", package = "gtfstools") gtfs <- read_gtfs(data_path) trip_segment_dur <- get_trip_segment_duration(gtfs) head(trip_segment_dur) trip_segment_dur <- get_trip_segment_duration(gtfs, trip_id = "CPTM L07-0") trip_segment_dur trip_segment_dur <- get_trip_segment_duration(gtfs, "CPTM L07-0", unit = "s") trip_segment_dur
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.