getCurrentTemperature: Get the latest recorded temperature for a location

Description Usage Arguments Details Value References Examples

View source: R/wrapper_functions.R

Description

Function will return the latest avialable temperature at a specified location.

Usage

1

Arguments

station_id

is a valid Weather Station ID (example: "BUF", "ORD", "VABB" for Mumbai). Valid Weather Station "id" values: "KFLMIAMI75" or "IMOSCOWO2" You can look these up at wunderground.com. You can get station_id's for a given location by calling getStationCode()

Details

A wrapper for getDetailedWeather(), it returns the last record in the web page. Uses Sys.Date() to get current time. This function returns temperature in Farenheit or Celcius depending on the caller's location.

Value

A one row data frame containing:

References

For a list of valid Weather Stations, try this format http://www.wunderground.com/weatherstation/ListStations.asp?selectedCountry=United+States and replace with your country of interest

Examples

1
2
3
4
## Not run: 
getCurrentTemperature(station ="HNL")

## End(Not run)

Example output

URL does not seem to exist: https://www.wunderground.com/history/airport/HNL/2018/7/16/DailyHistory.html?format=1
The original error message:
Could not resolve host: www.wunderground.comNULL
Warning message:
In getDetailedWeather(station_id, Sys.Date(), opt_warnings = TRUE) :
  Unable to get data from URL
 Check if URL is reachable

weatherData documentation built on June 6, 2017, 1:02 a.m.