Skip to contents

These functions take a dataset prepared for mqo calculations and calculates a daily or annual mean, maximum or minimum value. Averages are calculated within groups of any categorical columns present in the data (likely the "pollutant" and "site" columns, along with any metadata).

Usage

summarise_daily(
  data,
  statistic = "mean",
  min_coverage = 0.75,
  dict = mqor::mqo_dict()
)

summarise_annual(
  data,
  statistic = "mean",
  min_coverage = 0.75,
  dict = mqor::mqo_dict()
)

Arguments

data

An R data.frame containing at least five columns; a numeric column of observed values, a numeric column of modelled values, a character or factor column of identifiers that identify the site associated with the concentrations, a character or factor column of identifiers that identify the pollutant being measured/modelled, and a character or factor column containing just "fixed" or "indicative" to label each site. See demo_shortterm for an example format.

statistic

One of "mean", "min", or "max", representing the average, minimum or maximum

min_coverage

The minimum data coverage percent, expressed as a decimal (i.e., this option should be between 0 and 1, representing 0% and 100%). Note that calculations of data coverage can only be calculated for the data presented; the user must provide a complete timeseries for an accurate coverage calculation.

dict

See mqo_dict() for more information. Acts as a data dictionary to specify the columns in the data {mqor} should use.

See also

openair::timeAverage() for a more flexible and performant version of summarise_daily().

Other data utilities: filter_year(), mqo_percentile(), mutate_rolling_mean(), validate_mod_obs_pairs()