View source: R/WeatherForecast.R
weather_forecast | R Documentation |
This functions calls upon the weather forecast API from data.gov.sg and returns a data frame containing different metrics of the forecast. 2-hour, 24-hour and 4-day forecasts are availible. This data provided by the API is updated half-hourly.
weather_forecast(date_time = "", forecast = "2-hour")
date_time |
Defaults to current (SGD) time. Format: YYYY-MM-DDTHH:MM:SS |
forecast |
Defaults to "2-hour". Also availible for "24-hour" and "4-day" |
A dataframe the forecast for a given date and time, and forecast period.
weather_forecast()
weather_forecast(date = "2019-11-08T17:30:00", forecast = "24-hour")
weather_forecast(date = "2018-01-04T09:16:17", forecast = "4-day")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.