Description Usage Arguments Value Note Author(s) References See Also Examples
Use a search pattern to find a specific train station in Germany and its internal ID. The internal ID can be used to query the DB Timetable-API.
1 2 | timetable_station(pattern, authkey, first = TRUE, lang = "de",
format = "json")
|
pattern |
character string. Pattern used to find a specific train station, e.g. 'Berlin'. |
authkey |
character string. Authentication key to access the Timetable-API. See Note. |
first |
logical. If TRUE, the ID of the first matching station is returned. If FALSE, a list of stations is returned. |
lang |
character string. Set the API language. Default is 'de'. |
format |
character string. Set the API format. Default is 'json'. |
A character string if first = TRUE
. Otherwise 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_departures
, timetable_arrivals
, timetable_reference
1 2 3 4 5 | ## Not run:
timetable_station(pattern = "Berlin", authkey = authKey)
timetable_station(pattern = "Hamburg", authkey = authKey, first = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.