pat_loadLatest: Load PurpleAir time series data for a week

Description Usage Arguments Value Note See Also Examples

View source: R/pat_loadLatest.R

Description

A pre-generated PurpleAir Timeseries pat object will be loaded containing data for the most recent 7- or 45-day interval. Data are loaded from the archive set with either setArchiveBaseUrl() or setArchiveBaseDir() for locally archived files.

Usage

1
pat_loadLatest(id = NULL, label = NULL, pas = NULL, days = 7)

Arguments

id

PurpleAir sensor 'deviceDeploymentID'.

label

PurpleAir sensor 'label'.

pas

PurpleAir Synoptic pas object.

days

Number of days of data to include (7 or 45).

Value

A PurpleAir Timeseries pat object.

Note

Archive file names are generated with a unique "device-deployment" identifier by combining a unique location ID with a unique device ID. These deviceDeploymentID identifiers guarantee that movement of a sensor will result in the creation of a new time series.

Users may request a pat object in one of two ways:

1) Pass in id with a valid a deviceDeploymentID

2) Pass in both label and pas so that the deviceDeploymentID can be looked up.

See Also

pat_load

pat_loadMonth

pat_createNew

Examples

1
2
3
4
5
6
7
library(AirSensor)

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

pas <- pas_load()
pat <- pat_loadLatest(label = "SCSB_07", pas = pas)
pat_multiPlot(pat)

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