importAQE: importAQE

Description Usage Arguments Details Value See Also Examples

Description

Import air quality data from across the Air Quality England (AQE) network for specified parameters

Usage

1
2
3
importAQE(start_date = Sys.Date() - 1, end_date = Sys.Date() - 1,
  sites = "all", species = "all", borough_sf = NULL,
  meta_data = NULL, verbose = TRUE)

Arguments

start_date

Inclusive start date of data request. Must be a date object, Default: Sys.Date() - 1

end_date

Inclusive end date of data request. Must be date object, Default: Sys.Date() - 1

sites

character vector of site codes or 'all' to fetch all available sites, Default: 'all'

species

character vector of species codes or 'all' to fetch all available species, Default: 'all'

borough_sf

A simple-features data frame containing London Borough polygons, Default: NULL

meta_data

Meta data dataframe, as fetched by importAllLondon etc. If not provided will be fetched, Default: NULL

verbose

logical. Include site meta data in returned data frame, Default: TRUE

Details

If borough_sf is not provided, local authority name and inner/outer london category will not be returned.

Value

A data frame of hourly monitoring results

See Also

read.table period setNames

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
if(interactive()){
# For all sites/species:
df <- importAQE(start_date = as.Date('2019-01-01'),
end_date = as.Date('2019-01-07'))

# For specified sites and species:
df <- importAllLondon(start_date = as.Date('2019-01-01'),
end_date = as.Date('2019-01-07'),
sites = c("HIL1", "T55"),
species = c("NO2", "PM10", "PM2.5"))

# Providing meta data
meta_data <- getMetaAllLondon()
df <- importAllLondon(start_date = as.Date('2019-01-01'),
end_date = as.Date('2019-01-07'),
sites = c(c("HIL1", "T55")),
species = c("NO2", "PM10", "PM2.5"),
meta_data = meta_data)
 }

## End(Not run)

LiRogers/LondonAirQuality documentation built on May 27, 2019, 2:06 p.m.