Utilities for Working with Air Quality Monitoring Data

Utilities for working with air quality monitoring data with a focus on small particulates (PM2.5) generated by wildfire smoke. Functions are provided for downloading available data from the United States 'EPA' < https://www.epa.gov/outdoor-air-quality-data> and it's 'AirNow' air quality site < https://www.airnow.gov>. Additional sources of PM2.5 data made accessible by the package include: 'AIRSIS' (password protected) < https://www.oceaneering.com/data-management/> and 'WRCC' < https://wrcc.dri.edu/cgi-bin/smoke.pl>. Pregenerated data compilations are provided by 'PWFSL' < https://www.fs.fed.us/pnw/pwfsl/>.


CRAN_Status_Badge Downloads

Utilities for Working with Air Quality Monitoring Data

Background

The USFS Pacific Wildland Fire Sciences Lab AirFire team works to model wildland fire emissions and has created the BlueSky Modeling Framework. This system integrates a wide collection of models along a smoke modeling pipeline (fire information, fuel loadings, consumption modeling, emissions modeling, time rate of emissions modeling, plume height estimations, and smoke trajectory and dispersion modeling). The resulting model output has been integrated into many different smoke prediction systems and scientific modeling efforts.

The PWFSLSmoke R package is being developed for PWFSL to help modelers and scientists more easily work with PM2.5 data from monitoring locations across North America.

The package makes it easier to obtain data, perform analyses and generate reports. It includes functionality to:

  • download and easily work with regulatory PM2.5 data from the EPA and AirNow
  • download and quality control raw monitoring data from AIRSIS and WRCC
  • convert between UTC and local timezones
  • apply various algorithms to the data (nowcast, rolling means, aggregation, etc.)
  • provide interactive timeseries and maps through RStudio‚Äôs Viewer pane
  • create a variety of publication ready maps and timeseries plots

Installation

This package is designed to be used with R (>= 3.3) and RStudio so make sure you have those installed first.

Users will want to install the devtools package to have access to the latest version of the package from Github.

The following packages should be installed by typing the following at the RStudio console:

# Note that vignettes require knitr and rmarkdown
install.packages('knitr')
install.packages('rmarkdown')
install.packages('MazamaSpatialUtils')
devtools::install_github('mazamascience/PWFSLSmoke', build_vignettes=TRUE)

Any work with spatial data, e.g. assigning countries, states and timezones, will require installation of required spatial datasets. To get these datasets you should type the following at the RStudio console:

library(MazamaSpatialUtils)
dir.create('~/Data/Spatial', recursive=TRUE)
setSpatialDataDir('~/Data/Spatial')
installSpatialData()

Examples

Additional R Notebooks that demonstrate the functionality of the package can be found in the localNotebooks directory on github. These notebooks are not part of the package because they require installation of the MazamaSpatialUtils datasets.

To run them you should:

  • make sure you have the proper spatial data installed in ~/Data/Spatial/
  • make sure you have both the knitr and rmarkdown packages installed
  • download the localNotebooks/ directory
  • open a notebook with RStudio
  • click the "Knit" or "Preview" button in RStudio

This R package was created by Mazama Science and is being funded by the USFS Pacific Wildland Fire Sciences Lab.

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("PWFSLSmoke")

1.0.20 by Jonathan Callahan, a month ago


Browse source code at https://github.com/cran/PWFSLSmoke


Authors: Jonathan Callahan [aut, cre], Rohan Aras [aut], Zach Dingels [aut], Jon Hagg [aut], Jimin Kim [aut], Helen Miller [aut], Rex Thompson [aut], Alice Yang [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports cluster, dygraphs, futile.logger, ggmap, httr, jsonlite, leaflet, lubridate, maptools, mapproj, openair, png, raster, RColorBrewer, rgdal, RgoogleMaps, readr, reshape2, sp, stringr, xts, zoo

Depends on dplyr, magrittr, maps, MazamaSpatialUtils

Suggests knitr, rmarkdown


See at CRAN