Learn R Programming

AirSensor (version 1.0.8)

pat_loadMonth: Load PurpleAir time series data for a month

Description

A pre-generated PurpleAir Timeseries pat object will be loaded for the month requested with datestamp if available. Data are loaded from the archive set with either setArchiveBaseUrl() or setArchiveBaseDir() for locally archived files.

The datestamp must be in the following format:

  • "YYYYmm"

By default, the current month is loaded.

Usage

pat_loadMonth(
  id = NULL,
  label = NULL,
  pas = NULL,
  datestamp = NULL,
  timezone = "America/Los_Angeles"
)

Arguments

id

PurpleAir sensor 'deviceDeploymentID'.

label

PurpleAir sensor 'label'.

pas

PurpleAir Synoptic pas object.

datestamp

Date string in ymd order.

timezone

Timezone used to interpret datestamp.

Value

A PurpleAir Timeseries pat object.

See Also

pat_load

pat_loadLatest

pat_createNew

Examples

Run this code
# NOT RUN {
library(AirSensor)

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

# Reference an older 'pas' before this sensor was dropped
pas <- pas_load(20190901, archival = TRUE)

may <- pat_loadMonth(label = "SCNP_20", pas = pas, datestamp = 201905)
pat_multiPlot(may)
# }

Run the code above in your browser using DataLab