bus_incidents {metro}R Documentation

Bus Incidents

Description

Returns a set of reported bus incidents/delays for a given Route. Omit the Route to return all reported items.

Usage

bus_incidents(Route = NULL, api_key = wmata_key())

Arguments

Route

Base bus route; variations are not recognized (i.e.: C2 instead of C2v1, C2v2, etc.).

api_key

Subscription key which provides access to this API. Defaults Sys.getenv("WMATA_KEY") via wmata_key().

Format

A data frame with 1 row per incident and 5 variables:

IncidentID

Unique identifier for an incident.

IncidentType

Free-text description of the incident type. Usually Delay or Alert but is subject to change at any time.

RoutesAffected

Character string of routes affected. Routes listed are usually identical to base route names (i.e.: not 10Av1 or 10Av2, but 10A), but may differ from what our bus methods return.

Description

Free-text description of the delay or incident.

DateUpdated

Date and time (UTC) of last update.

Details

Note that the Route parameter accepts only base route names and no variations, i.e.: use 10A instead of 10Av1 and 10Av2.

Value

Data frame of bus incidents and delays.

See Also

https://developer.wmata.com/docs/services/54763641281d83086473f232/operations/54763641281d830c946a3d75

Other Incident APIs: elevator_incidents(), rail_incidents()

Examples

## Not run: 
bus_incidents()

## End(Not run)

[Package metro version 0.9.3 Index]