data_path <- system.file("extdata/ber_gtfs.zip", package = "gtfstools")
gtfs <- read_gtfs(data_path)
patterns <- get_stop_times_patterns(gtfs)
head(patterns)
# use the trip_id argument to control which trips are analyzed
patterns <- get_stop_times_patterns(
gtfs,
trip_id = c("143765658", "143765659", "143765660")
)
patterns
# use the type argument to control the type of pattern analyzed
patterns <- get_stop_times_patterns(
gtfs,
trip_id = c("143765658", "143765659", "143765660"),
type = "spatiotemporal"
)
patterns
Run the code above in your browser using DataLab