filter_stops: Get a set of stops for a given set of service ids and route...

Description Usage Arguments Value Examples

View source: R/joins.R

Description

Get a set of stops for a given set of service ids and route ids

Usage

1
filter_stops(gtfs_obj, service_ids, route_ids)

Arguments

gtfs_obj

as read by read_gtfs()

service_ids

the service for which to get stops

route_ids

the route_ids for which to get stops

Value

stops for a given service

Examples

1
2
3
4
5
local_gtfs_path <- system.file("extdata", "google_transit_nyc_subway.zip", package = "trread")
nyc <- read_gtfs(local_gtfs_path,local=TRUE)
select_service_id <- filter(nyc$calendar_df,monday==1) %>% pull(service_id)
select_route_id <- sample_n(nyc$routes_df,1) %>% pull(route_id)
filtered_stops_df <- filter_stops(nyc,select_service_id,select_route_id)

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