rail_finder | R Documentation |
Find the name, area, and code of a train station in the UK. For use in the rail_emissions
function.
rail_finder(
station,
region,
county,
district,
station_code,
distance = 0.1,
ignore.case = FALSE
)
station |
Name of train station. |
region |
Region the train station is in. One of |
county |
County the train station is in. |
district |
District the train station is in. |
station_code |
Code of the train station. |
distance |
Maximum distance allowed for a match between the name/country/city given, and that of the value in the data set. |
ignore.case |
If |
Data frame containing the station code, station name, region, county, district, latitude, and longitude of a train station in the UK.
# Can get the station code from the station. Gets similar matches.
rail_finder(station = "Bristo")
# Can get the code from the station and city.
rail_finder(station = "Bristo", county = "Bristol")
# Can find the name and district of a train station given the IATA code
rail_finder(station_code = "BRI")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.