Bus_ScheduleEst | R Documentation |
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.
Bus_ScheduleEst(access_token, county, routename, out=F)
access_token |
Your access token given by TDX platform. This can be derived from the function |
county |
Please fill in the English county name. Checking out the appropriate county name in dataframe |
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. |
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 |
Maintainer: Chia Jung, Yeh chia-jung.yeh@sydney.edu.au
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.