monitor_loadDaily: Load daily monitoring data from all sources

View source: R/monitor_loadDaily.R

monitor_loadDailyR Documentation

Load daily monitoring data from all sources

Description

Combine daily data from AirNow, AIRSIS and WRCC:

If archiveDataDir is defined, data will be loaded from this local archive. Otherwise, data will be loaded from the monitoring data repository maintained by the USFS AirFire team.

The files loaded by this function are updated once per day and contain data for the previous 45 days.

For the most recent data in the last 10 days, use monitor_loadLatest().

For data extended more than 45 days into the past, use monitor_load().

Usage

monitor_loadDaily(
  archiveBaseUrl = paste0("https://airfire-data-exports.s3.us-west-2.amazonaws.com/",
    "monitoring/v2"),
  archiveBaseDir = NULL,
  QC_negativeValues = c("zero", "na", "ignore")
)

Arguments

archiveBaseUrl

Base URL for monitoring v2 data files.

archiveBaseDir

Local base directory for monitoring v2 data files.

QC_negativeValues

Type of QC to apply to negative values.

Value

A mts_monitor object with PM2.5 monitoring data. (A list with meta and data dataframes.)

Note

This function guarantees that only a single time series will be associated with each locationID using the following logic:

  1. AirNow data takes precedence over data from AIRSIS or WRCC

  2. more recent data takes precedence over older data

This relevant mostly for "temporary" monitors which may be replaced after they are initially deployed. If you want access to all device deployments associated with a specific locationID, you can use the provider specific functions: airnow_loadDaily, airsis_loadDaily and wrcc_loadDaily

See Also

monitor_loadAnnual

monitor_loadLatest

Examples

## Not run: 
library(AirMonitor)
# Fail gracefully if any resources are not available
try({

monitor_loadDaily() %>%
  monitor_filter(stateCode %in% CONUS) %>%
  monitor_leaflet()

}, silent = FALSE)

## End(Not run)

AirMonitor documentation built on Sept. 27, 2024, 9:06 a.m.