disruptions_on_route: Disruptions on a given route

Description Usage Arguments Value Examples

View source: R/disruptions.R

Description

Disruptions on a given route

Usage

1
2
3
4
5
6
7
disruptions_on_route(
  route_id,
  stop_id = NULL,
  disruption_status = NULL,
  user_id = determine_user_id(),
  api_key = determine_api_key()
)

Arguments

route_id

Integer. These can be listed and described with the routes function.

stop_id

Integer. Optionally filter results to a specific stop ID. These can be searched for with the stops_on_route and stops_nearby functions.

disruption_status

Character. Can be used to filter to either "current" or "planned" disruptions. Defaults to NULL, in which case no filter is applied.

user_id

Integer or character. A user ID or devid provided by Public Transport Victoria. Refer to ?ptvapi for more details.

api_key

Character. An API key, with dashes, provided by Public Transport Victoria. Refer to ?ptvapi for more details.

Value

A tibble with the following columns:

Examples

1
2
3
4
5
6
## Not run: 
disruptions_on_route(6)
disruptions_on_route(6, stop_id = 1071)
disruptions_on_route(6, disruption_status = "current")

## End(Not run)

ptvapi documentation built on May 2, 2021, 9:06 a.m.