Description Usage Arguments Value Note Author(s) References See Also Examples
Provide a station, date and time to receive a departure board from the DB Timetable-API. Besides usual information, train specific information is provided, too.
1 2 | timetable_departures(station, direction, date, time, authkey,
reference = FALSE, lang = "de", format = "json")
|
station |
character string. Station specific ID from |
direction |
character string. Optional. Constrain the departure board by providing a direction through a station ID from |
date |
character string. Set the date of the departure board. Format: YYYY-MM-DD. |
time |
character string. Set the time of the departure board. Format: HH:MM. |
authkey |
character string. Authentication key to access the Timetable-API. See Note. |
reference |
logical. If TRUE, additional train specific reference URLs are returned with the departure board. Default is FALSE. |
lang |
character string. Set the API language. Default is 'de'. |
format |
character string. Set the API format. Default is 'json'. |
A departure board as a data.frame
.
To use this function and to access the DB Timetable-API, you need to have an authentication key. Authentication keys can be requested from DBOpenData@deutschebahn.com
.
Philipp Ottolinger
http://data.deutschebahn.com/dataset/api-fahrplan
timetable_station
, timetable_arrivals
, timetable_reference
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
berlin <- timetable_station(pattern = "Berlin Hbf", authkey = authKey)
timetable_departures(station = berlin, date = "2016-12-31", time = "12:00",
authkey = authKey)
# receive reference URLs
timetable_departures(station = berlin, date = "2016-12-31", time = "12:00",
reference = TRUE, authkey = authKey)
# use a direction
hamburg <- timetable_station(pattern = "Hamburg Hbf", authkey = authKey)
timetable_departures(station = berlin, direction = hamburg,
date = "2016-12-31", time = "12:00",
authkey = authKey)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.