Use it to summarise service. For example, get a count of the number of services for a date. See example.

set_date_service_table(gtfs_obj)

Arguments

gtfs_obj

a gtfs_object as read by read_gtfs

Value

a date_service data frame

Examples

library(dplyr) local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "tidytransit") nyc <- read_gtfs(local_gtfs_path, local=TRUE) %>% set_date_service_table() nyc_services_by_date <- nyc$.$date_service_table # count the number of services running on each date nyc_services_by_date %>% group_by(date) %>% count()
#> # A tibble: 133 x 2 #> # Groups: date [133] #> date n #> <date> <int> #> 1 2018-06-24 23 #> 2 2018-06-25 24 #> 3 2018-06-26 27 #> 4 2018-06-27 27 #> 5 2018-06-28 27 #> 6 2018-06-29 27 #> 7 2018-06-30 23 #> 8 2018-07-01 23 #> 9 2018-07-02 24 #> 10 2018-07-03 27 #> # … with 123 more rows