A pre-generated airsensor
object will be loaded for
the given month. Archived data for SCAQMD sensors go back to January, 2018.
The datestamp
can must be in the following format:
"YYYYmm"
By default, the current month is loaded.
Each airsensor
object contains data from a named collection of
PurpleAir sensors.
sensor_loadMonth(
collection = "scaqmd",
datestamp = NULL,
timezone = "America/Los_Angeles"
)
Name associated with the collection.
A date string in ymd order.
Timezone used to interpret datestamp
.
An object of class "pa_timeseries".
# \donttest{
# Fail gracefully if any resources are not available
try({
library(AirSensor)
setArchiveBaseUrl("https://airsensor.aqmd.gov/PurpleAir/v1")
sensor_loadMonth("scaqmd", 202005) %>%
PWFSLSmoke::monitor_timeseriesPlot(style = 'gnats')
}, silent = FALSE)
#> ERROR [2023-04-03 16:31:33] data file could not be loaded from: https://airsensor.aqmd.gov/PurpleAir/v1/airsensor/2020/airsensor_scaqmd_202005.rda
#> Error : Data file could not be loaded from: https://airsensor.aqmd.gov/PurpleAir/v1
# }