Bus_StopOfRoute: Retrieve the stops of each bus routes

View source: R/TDX.R

Bus_StopOfRouteR Documentation

Retrieve the stops of each bus routes

Description

The function is used to download the bus stop of route. And it supports to download data of city buses and intercity buses.

Usage

Bus_StopOfRoute(access_token, county, dates=F, dtype="text", 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.

dates

If historical data would be retrieved, this argument should be set; otherwise the default value is FALSE. The date format should be YYYY-MM-DD.

dtype

The class of data, including text (data frame) and sf (simple feature). The default value is text.

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. Note that the directory must contain ".shp" when exporting simple feature. And the directory must contain ".csv" or ".txt" when exporting text file.

Value

Some columns definition are listed below.

RouteUID It contains every subroutes and directions in a same RouteUID.
SubRouteUID If the direction or subroute is not the same, a different SubRouteUID must be recorded.
StopSequence The sequence of the bus stops for each subroute.

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

Bus_StopOfRoute(access_token, "Hsinchu")
Bus_StopOfRoute(access_token, "Taipei", dtype="text", out="./Taipei_StopOfRoute.csv")

# historical data
Bus_StopOfRoute(access_token, "Taipei", "2022-01-01")

ChiaJung-Yeh/NYCU_TDX documentation built on Nov. 25, 2024, 6:57 a.m.