pat_createPATimeseriesObject: Combine PurpleAir raw dataframes

Description Usage Arguments Value References Examples

View source: R/pat_createPATimeseriesObject.R

Description

The pat_downloadParseRawData() function returns four dataframes of data from ThingSpeak. These must be combined into the single data dataframe found in a 'pat' object. This process involves selecting data columns to use and bringing all data onto a unified time axis.

Two sets of data values exist in the raw data, one for each of two algorithms that convert particle counts into aerosol density.

PurpleAir has the following description:

The CF_ATM and CF_1 values are calculated from the particle count data with a proprietary algorithm developed by the PMS5003 laser counter manufacturer, PlanTower. The specifics of the calculation are not available to the public (or us for that matter). However, to convert the particle count data (um/dl) to a mass concentration (ug/m3) they must use an average particle density. They do provide 2 different mass concentration conversion options; CF_1 uses the "average particle density" for indoor particulate matter and CF_ATM uses the "average particle density" for outdoor particulate matter.

The AirSensor package and all associated archive data use PlanTower algorithm CF_ATM.

Usage

1

Arguments

pat_rawList

List of dataframes as returned by pat_downloadParseRawData().

Value

A PurpleAir Timeseries pat object.

References

https://www2.purpleair.com/community/faq#!hc-what-is-the-difference-between-cf-1-and-cf-atm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(AirSensor)

setArchiveBaseUrl("http://data.mazamascience.com/PurpleAir/v1")

pas <- pas_load()

pat_rawList <- pat_downloadParseRawData(
  id = "78df3c292c8448f7_21257",
  pas = pas
)

pat <- pat_createPATimeseriesObject(pat_rawList)

pat_multiPlot(pat)

AirSensor documentation built on March 13, 2021, 1:07 a.m.