weather_now {openmeteo} | R Documentation |
Retrieve Current Weather from the Open-Meteo API
Description
weather_now()
calls the Open-Meteo weather API for the most recently
recorded weather conditions a given location. Location is provided either as
string or c(latitude,longitude)
.
Usage
weather_now(location, response_units = NULL, timezone = "auto")
Arguments
location |
Required. The location for which data will be retrieved.
Supplied as either a |
response_units |
Supply to convert temperature, windspeed, or
precipitation units. This defaults to: |
timezone |
specify timezone for time data as a string, i.e.
"australia/sydney" (defaults to "auto", the timezone local to the specified
|
Value
Current weather conditions: temperature, windspeed, wind direction and weathercode.
Examples
# current weather in Montreal
weather_now("Montreal")
# current weather at the North Pole in Imperial units
weather_now(c(90, 0),
response_units = list(
temperature_unit = "fahrenheit",
windspeed_unit = "mph"
)
)