rail_finder {carbonr} | R Documentation |
Find the station code for a train station
Description
Find the name, area, and code of a train station in the UK. For use in the rail_emissions
function.
Usage
rail_finder(
station,
region,
county,
district,
station_code,
distance = 0.1,
ignore.case = FALSE
)
Arguments
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 |
Value
Data frame containing the station code, station name, region, county, district, latitude, and longitude of a train station in the UK.
Examples
# 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")
[Package carbonr version 0.2.1 Index]