Rail_ODFare | R Documentation |
The function is used to retrieve the fare of each OD pair of railway system. Data includes the station ID and name of the OD pair, train type, ticket type, fare class, price, and so forth.
Rail_ODFare(access_token, operator, out=F)
access_token |
Your access token given by TDX platform. This can be derived from the function |
operator |
Please fill in the operator code of given railway system. Checking out the appropriate operator code in dataframe |
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. |
Some columns definition are listed below.
OriginStationID | Origin station of the OD pair. | |
DestinationStationID | Destination station of the OD pair. | |
TrainType | Type of train, including local train and express train. See the code table below. | |
TicketType | Type of ticket, including one-way ticket, smart card, commuter ticketand so forth. See the code table below. | |
FareClass | Fare class of the ticket, including adult, student, child, and so forth. See the code table below. | |
CabinClass | Class of the cabin, including standard class, business class, and so forth." | |
Price | Price of the OD fare under specific train type, ticket type, fare class, and cabin class." | |
Codes of TrainType are listed below.
0 | No distinguishment |
1 | Local train |
2 | Express train |
Codes of TicketType are listed below.
1 | One-way ticket |
2 | Round-trip ticket |
3 | Smart card |
4 | Multi-ride ticket |
5 | 30 days periodic ticket |
6 | 60 days periodic ticket |
Codes of FareClass are listed below.
1 | Adult |
2 | Student |
3 | Child |
4 | Senior |
5 | Disabled |
6 | Disabled Child |
7 | Disabled accompany |
8 | Group |
Codes of CabinClass are listed below.
1 | Standard class |
2 | Business class |
3 | Non-reserved car |
Maintainer: Chia Jung, Yeh chia-jung.yeh@sydney.edu.au
# retrieve the general time table of TRA
Rail_ODFare(access_token, operator="TRA")
# retrieve the station time table of TRTC (Taipei Metro)
Rail_ODFare(access_token, operator="TRTC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.