pat_toMonitor: Convert a PurpleAir Timeseries to a 'mts_monitor' object

View source: R/pat_toMonitor.R

pat_toMonitorR Documentation

Convert a PurpleAir Timeseries to a 'mts_monitor' object

Description

Enhance an hourly PurpleAir Timeseries pat object created with pat_createHourly() and create an object of class mts_monitor for use with the AirMonitor package.

Usage

pat_toMonitor(pat = NULL, applyCorrection = TRUE)

Arguments

pat

Previously generated pat object.

applyCorrection

Logical specifying whether to apply the EPA correction algorithm. (See pat_applyCorrection.)

Value

An AirMonitor package mts_monitor object.

References

PurpleAir

PurpleAir API

PurpleAir Terms of service

PurpleAir Data license

PurpleAir Data Attribution

Examples


# Fail gracefully if any resources are not available
try({

# AirSensor2 package
library(AirSensor2)
monitor <-
  example_pat_epa %>%
  pat_toMonitor()

AirMonitor::monitor_timeseriesPlot(monitor, shadedNight = TRUE)

}, silent = FALSE)


MazamaScience/AirSensor2 documentation built on Oct. 31, 2024, 1:39 a.m.