Bus_ScheduleEst: Retrieve the estimated schedule time of each bus stops

Bus_ScheduleEstR Documentation

Retrieve the estimated schedule time of each bus stops

Description

The function is used to download the estimated schedule time of any stop for a specific route. It supports to download data of city buses and intercity buses. Note that the function can retrieve the data of single or mutiple bus routes.

Usage

Bus_ScheduleEst(access_token, county, routename, out=F)

Arguments

access_token

Your access token given by TDX platform. This can be derived from the function get_token().

county

Please fill in the English county name. Checking out the appropriate county name in dataframe TDX_County. If Intercity is used, the function retrieves the intercity bus data.

routename

The specific RouteName that should be retrive for its estimated schedule time. This can be a character or a vector. Please ensure that the RouteName must contain in the county; otherwise, it would retrieve nothing.

out

If the result should be exported to the local, please fill in the directory. The default value is FALSE, which does not export the data.

Value

Some columns definition are listed below.

TripID It records the ID for each trip.
SubRouteID There might exists two or more SubRouteID due to the different direction of sub-route.
HistoricalEstArrivalTime The estimated travel time of specific bus stop.
HistoricalEstArrivalTimeSD The standard deviation of the estimated travel time.
ServiceTag It records the time of operation (weekday or weekend)."

Codes of Direction are listed below.

0 outbound
1 inbound
2 loop
255 unknown

Author(s)

Maintainer: Chia Jung, Yeh chia-jung.yeh@sydney.edu.au

Examples

# routename can be a character
Bus_ScheduleEst(access_token, "Intercity", "0701")

# routename can also be a vector
Bus_ScheduleEst(access_token, "Intercity", c("0701", "0968"))

# routename can be retrieve from the function Bus_Route()
temp=Bus_Route(access_token, "Taipei")
Bus_TravelTime(access_token, "Taipei", unique(temp$RouteName), out="./Taipei_StopTime.csv")

ChiaJung-Yeh/NYCU_TDX documentation built on Aug. 28, 2024, 10:43 p.m.