pas_enhanceData: Enhance synoptic data from PurpleAir

Description Usage Arguments Value Note See Also Examples

View source: R/pas_enhanceData.R

Description

Enhance raw synoptic data from PurpleAir to create a generally useful dataframe.

Steps include:

1) Replace variable with more consistent, more human readable names.

2) Add spatial metadata for each sensor including:

3) Convert data types from character to POSIXct and numeric.

4) Add distance and monitorID for the two closest PWFSL monitors

5) Add additional metadata items:

Filtering by country can speed up the process of enhancement and may be performed by providing a vector ISO country codes to the countryCodes argument. By default, no subsetting is performed.

Setting outsideOnly = TRUE will return only those records marked as 'outside'.

Usage

1
pas_enhanceData(pas_raw = NULL, countryCodes = NULL, includePWFSL = TRUE)

Arguments

pas_raw

Dataframe returned by pas_downloadParseRawData().

countryCodes

ISO country codes used to subset the data.

includePWFSL

Logical specifying whether to calculate distances from PWFSL monitors.

Value

Enhanced Dataframe of synoptic PurpleAir data.

Note

For data obtained on July 28, 2018 this will result in removal of all 'B' channels, even those whose parent 'A' channel is marked as 'outside'. This is useful if you want a quick, synoptic view of the network, e.g. for a map.

See Also

pas_downloadParseRawData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12

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