weather | R Documentation |
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.
weather(poi, product = "observation", url_only = FALSE)
poi |
|
product |
character, weather product of the 'Destination Weather API'. Supported products: |
url_only |
boolean, only return the generated URLs ( |
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.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.