ukair_get_hourly_data: Get hourly data for DEFRA stations

View source: R/ukair_get_hourly_data.R

ukair_get_hourly_dataR Documentation

Get hourly data for DEFRA stations

Description

This function fetches hourly data from DEFRA's air pollution monitoring stations.

Usage

ukair_get_hourly_data(site_id = NULL, years = NULL)

Arguments

site_id

This is the ID of a specific site.

years

Years for which data should be downloaded.

Details

The measurements are generally in \mu g/m^3 (micrograms per cubic metre). To check the units, refer to the table of attributes (see example below). Please double check the units on the DEFRA website, as they might change over time.

Value

A data.frame containing hourly pollution data.

Examples

 ## Not run: 
 # Get data for 1 year
 output <- ukair_get_hourly_data("ABD", 2014)

 # Get data for multiple years
 output <- ukair_get_hourly_data("ABD", 2014:2016)

 # Get units
 attributes(output)$units

 
## End(Not run)


kehraProject/rdefra documentation built on Feb. 4, 2024, 5:15 a.m.