sensortoolkit.qc._purpleair_abcleaning.purpleair_ab_averages
- purpleair_ab_averages(df, cleaning=True, a_col_name=None, b_col_name=None)[source]
Average A and B channel data for PurpleAir sensors.
- QC criteria via Barkjohn et al. 2021, publication link:
- Parameters
df (pandas dataframe) – PurpleAir dataframe containing columns with A and B channel PM2.5 data.
cleaning (bool) – If true, datapoints outside the QC criteria of Barkjohn et al. 2021 will be invalidated (set null). Else, QC criteria will not be applied.
a_col_name (str) – The column header name for PM2.5 data from channel A.
b_col_name (str) – The column header name for PM2.5 data from channel B.
- Returns
Modified PurpleAir dataframe with computed AB averages
- Return type
df (pandas dataframe)