getStationCode: Gets the Weather Station code for a location (in the US)
Description
This function goes through the USAirportWeatherStations
dataset and looks for matches. Usually, the 4 letter
airportCode is what you are after.
Usage
getStationCode(stationName, region = NULL)
Arguments
stationName
String that you want to get the
weatherStation code for
region
A qualifier about the station's location.
It could be a continent or a country. If in the US,
region is a two-letter state abbreviation. Ex. "AK" for
Alaska
Value
A one row data frame containing:
A string
of Station Name that matched
the region. (two-letter
state abbreviation if in the US)
The 4-letter weather
station ID. (This is the string you use when calling
getDetailedWeather())