weather_forecast: Weather Forecast

View source: R/WeatherForecast.R

weather_forecastR Documentation

Weather Forecast

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

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

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 Jan. 15, 2023, 5:07 p.m.