caaqs_metric | R Documentation |
Compute specific CAAQS metrics for different forms of air pollution.
pm_24h_caaqs(data, dt = "date_time", val = "value", by = NULL, quiet = FALSE)
pm_annual_caaqs(
data,
dt = "date_time",
val = "value",
by = NULL,
quiet = FALSE
)
o3_caaqs(data, dt = "date_time", val = "value", by = NULL, quiet = FALSE)
so2_1yr_caaqs(data, dt = "date_time", val = "value", by = NULL, quiet = FALSE)
so2_3yr_caaqs(
data,
dt = "date_time",
val = "value",
by = NULL,
exclude_df = NULL,
exclude_df_dt = NULL,
quiet = FALSE
)
no2_1yr_caaqs(data, dt = "date_time", val = "value", by = NULL, quiet = FALSE)
no2_3yr_caaqs(
data,
dt = "date_time",
val = "value",
by = NULL,
exclude_df = NULL,
exclude_df_dt = NULL,
quiet = FALSE
)
data |
Data frame. Hourly raw pollution data with at least date-time and value columns |
dt |
Character. The name of the date-time column. Default |
val |
Character. The name of the value column. Default |
by |
Character vector. Grouping variables in data, probably an id if using multiple sites. Even if not using multiple sites, you should specify the id column so that it is retained in the output. |
quiet |
Logical. Suppress progress messages (default FALSE) |
exclude_df |
Data frame. The dates over which data should be excluded (see details). Data should be arranged either with one column of dates to omit, or two columns specifying a series of start and end date ranges to omit. |
exclude_df_dt |
Character vector. The names of the date columns in
|
To omit days which are suspected to be influenced by Transboundary
Flows or Exceptional Events create a data frame that either a) contains a
column listing all the days which are to be omitted, or b) contains two
columns listing the start and end dates of all the date periods which are
to be omitted. This is supplied as exclude_df
. Use
exlcude_df_dt
to specify the name of the column containing the
dates, or the names of the columns containing the start and end of the date
ranges (see examples and vignette for more details).
caaqs
object with results of the caaqs analysis, including results
from intermediate steps. The final caaqs
results can be extracted with the
get_caaqs()
function and contains the following columns:
caaqs_year The year corresponding to the CAAQS metric
metric The type of CAAQS metric calculated
metric_value The CAAQS metric value, rounded to appropriate digits
caaqs The CAAQS status, Achieved, Not Achieved, or Insufficient Data
mgmt The management status actions
excluded Logical value indicating whether any of the underlying data was excluded due to transboundary flows or exceptional events
flag_daily_incomplete Logical value indicating whether any of the daily data was flagged as incomplete (see CAAQS guidelines for more details). If NA, indicates that this particular metric is never flagged.
flag_yearly_incomplete Logical value indicating whether any of the yearly data was flagged as incomplete (see CAAQS guidelines for more details). If NA, indicates that this particular metric is never flagged.
To obtain any of the intermediate results data frames, use the
get_*
family of functions. See '?get_caaqs
CCME Guidance document on achievement determination Canadian ambient air quality standards for fine particulate matter and ozone https://www.ccme.ca/files/Resources/air/aqms/pn_1483_gdad_eng.pdf.
# Normal run
pm <- pm_24h_caaqs(pm25_sample_data, by = c("ems_id", "site"))
pm
get_caaqs(pm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.