Users will obtain real-time information of their favorite routes, including the estimated arrival time, waiting time, travel time, current status, delay and alert message. It also allows users to collect and save the real-time information for a given period in a data frame through calling the function periodically.

myfavrt(bus, start_id, end_id, key = Sys.getenv("BUS_CLIENT_KEY"),
  interval = 0, times = 1)

Arguments

bus

Bus number.

start_id

ID of the departure stop.

end_id

ID of the destination stop.

key

Key for accessing the API.

interval

Time interval between calling the function.

times

The number of times calling the function.

Value

Dataframe with a set of real-time information in a given period.

Examples

myfavrt(bus = 126, start_id = 36, end_id = 60, interval= 0, times = 1)
#> no. current_time bus_num start_stop_id start_stop_name #> 1 126 20181217 12:29 126 36 Jackson + 2609 West Alley #> end_stop_id end_stop_name wait_time_in_min departurel_time #> 1 60 Jackson + Aberdeen 16 20181217 12:46 #> arrival_time travel_time_in_min delay status #> 1 20181217 12:57 11 mins FALSE Planned Reroute