weather {hereR} | R Documentation |
HERE Destination Weather API: Observations, Forecasts, Astronomy and Alerts
Description
Weather forecasts, reports on current weather conditions, astronomical information and alerts at a specific location (coordinates or location name) based on the HERE 'Destination Weather' API. The information comes from the nearest available weather station and is not interpolated.
Usage
weather(poi, product = "observation", url_only = FALSE)
Arguments
poi |
|
product |
character, weather product of the 'Destination Weather API'. Supported products: |
url_only |
boolean, only return the generated URLs ( |
Value
An sf
object containing the requested weather information at the nearest weather station.
The point geometry in the sf
object is the location of the weather station.
References
Examples
# Provide an API Key for a HERE project
set_key("<YOUR API KEY>")
# Observation
observation <- weather(poi = poi, product = "observation", url_only = TRUE)
# Forecast
forecast <- weather(poi = poi, product = "forecast_hourly", url_only = TRUE)
# Astronomy
astronomy <- weather(poi = poi, product = "forecast_astronomy", url_only = TRUE)
# Alerts
alerts <- weather(poi = poi, product = "alerts", url_only = TRUE)