# \dontshow{
old_dt_threads <- data.table::setDTthreads(1)
on.exit(data.table::setDTthreads(old_dt_threads), add = TRUE)
# }
spo_path <- system.file("extdata/spo_gtfs.zip", package = "gtfstools")
poa_path <- system.file("extdata/poa_gtfs.zip", package = "gtfstools")
# feeds may be given as paths to their .zip files
daily_trips <- get_calendar_overlap(c(spo_path, poa_path))
head(daily_trips)
# or as a list of GTFS objects, whose names are used as feed names
feeds <- list(spo = read_gtfs(spo_path), poa = read_gtfs(poa_path))
get_calendar_overlap(feeds, resolution = "periods")
if (requireNamespace("ggplot2", quietly = TRUE)) {
get_calendar_overlap(feeds, plot = TRUE)
}
Run the code above in your browser using DataLab