Returns the duration 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 duration of each specified trip.
The duration of a trip is defined as the time difference between its last
arrival time and its first departure time, as specified in the
1 2 3 4 5 6 7 8 9 10 11 12 13
data_path <- system.file("extdata/spo_gtfs.zip", package = "gtfstools") gtfs <- read_gtfs(data_path) trip_duration <- get_trip_duration(gtfs) head(trip_duration) trip_ids <- c("CPTM L07-0", "2002-10-0") trip_duration <- get_trip_duration(gtfs, trip_id = trip_ids) trip_duration trip_duration <- get_trip_duration(gtfs, trip_id = trip_ids, unit = "h") trip_duration
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.