Learn R Programming

datagovsgR (version 1.0.0)

weather_reading: Weather Reading

Description

This functions calls upon the weather reading API from data.gov.sg and returns a list containing the air temperature, rainfall, relative humidity, wind direction and speed across Singapore. Data is updated every 5 minutes for the rainfall API, and every half minute for the other 4 API from NEA.

Usage

weather_reading(date_time = "")

Value

A dataframe containing various weather readings from weather stations

Arguments

date_time

Defaults to current (SGD) time. Format: YYYY-MM-DDTHH:MM:SS

Details

This API takes slighlty longer than the other APIs in the package as 5 APIs are wrapped within this function.

Examples

Run this code
weather_reading()
weather_reading(date = "2019-11-08T17:30:00")
weather_reading(date = "2018-01-04T09:16:17")

Run the code above in your browser using DataLab