Rail_TimeTable: Retrieve the timetable of railway system

Rail_TimeTableR Documentation

Retrieve the timetable of railway system

Description

The function is used to download the timetable of railway system. There are two types of format of time table, general and station. general means to record the time table by each train No., while station represents record the time table based on each station. Please look up the "record" arguments below to find out details of settings.

Usage

Rail_TimeTable(access_token, operator, record, out=F)

Arguments

access_token

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

operator

Please fill in the operator code of given railway system. Checking out the appropriate operator code in dataframe TDX_Railway.

record

The types of format of time table, including general and station. general means to record the time table by each train No., while station represents record the time table based on each station. TRA provides both format of time table. THSR only provides "general" format. All MRT system only provides station based time table, but note that TMRT (Taichung MRT) does not provide any time table. Also please note that Wenhu Line does not provide station time table in TRTC (Taipei Metro).

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 ".csv" or ".txt" when exporting text file.

Author(s)

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

Examples

# retrieve the general time table of TRA
Rail_TimeTable(access_token, operator="TRA", record="general")

# retrieve the station time table of TRTC (Taipei Metro)
Rail_TimeTable(access_token, operator="TRTC", record="station")

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