R/Clarity_createOpenMonitor.R
Clarity_createOpenMonitor.RdDownload, parse and enhance hourly timeseries data from Clarity and create an object of class `mts_monitor` for use with the AirMonitor package.
Clarity_createOpenMonitor(
api_key = NULL,
synoptic = NULL,
datasourceId = NULL,
format = "USFS2",
parameter = c("pm2.5", "nowcast"),
applyQC = TRUE
)Clarity API READ Key. If `api_key = NULL`, it will be obtained using `getAPIKey("Clarity-read")`.
Previously generated *synoptic* object containing `datasourceId`.
Clarity sensor identifier.
Customized output format ("USFS2", "USFS").
Parameter to use for data ("pm2.5" or "nowcast")
Logical specifying whether to use the Clarity QCFlag to invalidate data values.
An AirMonitor package *mts_monitor* object.
# \donttest{
# Fail gracefully if any resources are not available
try({
library(AirSensor2)
initializeMazamaSpatialUtils()
synoptic <-
Clarity_createOpenSynoptic(
api_key = Clarity_API_READ_KEY
)
mon <-
Clarity_createOpenMonitor(
api_key = Clarity_API_READ_KEY,
synoptic = synoptic,
datasourceId = "DACHW7097",
parameter = "pm2.5"
)
}, silent = FALSE)
#> Error in eval(expr, envir) : object 'Clarity_API_READ_KEY' not found
# }