# \donttest{
# obtain temperature forecasts for the South Pole's next 7 days
weather_forecast(c(-90, 0), hourly = "temperature_2m")
# obtain temperature and precipitation forecasts for NYC in Imperial units
weather_forecast("nyc",
hourly = c("temperature_2m", "precipitation"),
response_units = list(
temperature_unit = "fahrenheit",
precipitation_unit = "inch"
)
)
# will it rain tomorrow in Jakarta?
tomorrow <- Sys.Date() + 1
weather_forecast("jakarta", tomorrow, tomorrow, daily = "precipitation_sum")
# }
Run the code above in your browser using DataLab