Returns a set of ordered stations and distances between two stations on the same line.
rail_path(FromStationCode, ToStationCode, api_key = wmata_key())A tibble 1 row per arrival with 6 variables:
Two-letter abbreviation for the line (e.g.: RD, BL, YL, OR, GR, or SV) this station's platform is on.
Station code for this station. Use this value in other rail-related APIs to retrieve data about a station.
Full name for this station, as shown on the WMATA website.
Ordered sequence number.
Distance in meters to the previous station in the
list, ordered by SeqNum. Converted from feet, rounded to the nearest
meter.
Station code for the origin station. Use the Station List method to return a list of all station codes.
Station code for the destination station. Use the Station List method to return a list of all station codes.
Subscription key which provides access to this API. Defaults
Sys.getenv("WMATA_KEY") via wmata_key().
A data frame of stations on rail path.
Note that this method is not suitable on its own as a pathfinding solution between stations.
Other Rail Station Information:
rail_destination(),
rail_entrance(),
rail_lines(),
rail_stations(),
rail_times(),
station_info()
if (FALSE) {
rail_path("A01", "A08")
}