average_trends: Compare average trend over all sites with average trend over...

Description Usage Arguments Value Examples

Description

Produces plots of annual average trends in the pollutant of interest aggregated over all sites, and over the long term sites only (i.e. sites open constantly over the period of interest).

Usage

1
2
3
average_trends(obs, pollutant, stat = "median",
  start.date = "2000-01-01", end.date = "2017-12-31",
  avg.time = "year")

Arguments

obs

A data frame of ambient pollutant concentration data. Must contain the columns: site_code, date, value. If 'pollutant' is a pollutant ratio, the data frames of the corresponding pollutants must be supplied as a list of data frames in the order they are given in the ratio. E.g. for pollutant = "no2/nox", obs = list(obs.no2, obs.nox).

pollutant

The pollutant of interest (character string). To calculate rolling change trend for a pollutant ratio, separate the two pollutants with a forward slash e.g. pollutant = "no2/nox".

stat

The metric used to average the ambient concentration data by year. Options: "median", "mean".

start.date

The starting date of the period of interest. Data capture to filter long term sites will be conducted using this date as the starting date.

end.date

The end date of the period of interest. Data capture to filter long term sites will be conducted using this date as the ending date.

avg.time

Resolution to average data to. Options: "year", "month", "day".

Value

A list of plots:

Note: if there are no long term sites available for the period of interest, only the average.trend and average.allsites will be returned.

Examples

1
2
3
4
## Not run: 
average_trends(london_nox_data, pollutant = "nox", start.date = "2000-01-01", end.date = "2017-12-31")

## End(Not run)

pollylang/aqtrends documentation built on May 20, 2019, 8:24 p.m.