This vignette covers how to use function get_alert() and alertstat() in the rCTA package. They allow users to look up real-time and detailed information of alerts and get an overview of the current bus services.

Look up Alerts

Function get_alert() allows to get detailed information about current alerts, which is helpful for schedule traveling. The following example shows how to get the alert information of bus number 8:

result <-get_alert(bus = 8)
knitr::kable(head(result))
Headline ShortDescription EventStart EventEnd
New Schedules in Effect Beginning Sunday, December 16, updated schedules went into effect for several bus routes. 2018-12-16 NA

Statistics of Alerts

Function alertstat() allows to obtain an overview of current alerts of all CTA buses through a summary table that provide the count of each type of alerts.

result <- alertstat()
knitr::kable(head(result), col.names = c("Type", "Frequency"))
Type Frequency
Bus Stop Note 2
Bus Stop Relocation 8
Planned Reroute 15
Service Change 13
Special Note 136