weather_forecast: Weather Forecast

Description Usage Arguments Value Examples

View source: R/WeatherForecast.R

Description

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.

Usage

1
weather_forecast(date_time = "", forecast = "2-hour")

Arguments

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"

Value

A dataframe the forecast for a given date and time, and forecast period.

Examples

1
2
3
weather_forecast()
weather_forecast(date = "2019-11-08T17:30:00", forecast = "24-hour")
weather_forecast(date = "2018-01-04T09:16:17", forecast = "4-day")

datagovsgR documentation built on July 1, 2020, 10:48 p.m.