get_date_service_table: Returns all possible date/service_id combinations as a data...

Description Usage Arguments Value Examples

View source: R/time.R

Description

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

Usage

1

Arguments

gtfs_obj

a gtfs_object as read by read_gtfs

Value

a date_service data frame

Examples

1
2
3
4
5
6
library(dplyr)
local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "trread")
nyc <- read_gtfs(local_gtfs_path, local=TRUE)
nyc_services_by_date <- nyc %>% get_date_service_table()
# count the number of services running on each date
nyc_services_by_date %>% group_by(date) %>% count()

r-gtfs/trread documentation built on Aug. 30, 2021, 12:32 p.m.