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")
Defaults to current (SGD) time. Format: YYYY-MM-DDTHH:MM:SS
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.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.