Description Usage Arguments Value Note Examples
View source: R/PurpleAirQC_hourly_AB_03.R
Creates a pm25 timeseries by averaging aggregated data from the A and B channels and applying the following QC logic:
Create pm25 by averaging the A and B channel aggregation means
Invalidate data where: (min_count < 20)
Invalidate data where: (A/B hourly difference > 5 AND A/B hourly percent difference > 70%)
Invalidate data where: (A/B hourly data recovery < 90%)
1 | PurpleAirQC_hourly_AB_03(pat = NULL, min_count = 20, returnAllColumns = FALSE)
|
pat |
A PurpleAir timeseries object. |
min_count |
Aggregation bins with fewer than |
returnAllColumns |
Logical specifying whether to return all columns
of statistical data generated for QC algorithm or just the final |
Data frame with columns datetime
and pm25
.
Purple Air II sensors reporting after the June, 2019 firmware
upgrade report data every 2 minutes or 30 measurements per hour. The default
setting of min_count = 20
is equivalent to a required data recovery
rate of 67%.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | library(AirSensor)
df_00 <-
example_pat_failure_A %>%
pat_qc() %>%
PurpleAirQC_hourly_AB_00()
df_01 <-
example_pat_failure_A %>%
pat_qc() %>%
PurpleAirQC_hourly_AB_01()
df_03 <-
example_pat_failure_A %>%
pat_qc() %>%
PurpleAirQC_hourly_AB_03()
layout(matrix(seq(2)))
plot(df_00, pch = 16, cex = 0.8, col = "red")
points(df_01, pch = 16, cex = 0.8, col = "black")
title("example_pat_failure_A -- PurpleAirQC_hourly_AB_01")
plot(df_00, pch = 16, cex = 0.8, col = "red")
points(df_03, pch = 16, cex = 0.8, col = "black")
title("example_pat_failure_A -- PurpleAirQC_hourly_AB_03")
layout(1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.