Skip to content

gmcginnis/AirVizViewR

Repository files navigation

AirVizViewR

☛ Visit the dashboard here

☛ Full link: https://gmcginnis.shinyapps.io/AirVizViewR/

☛ Alternative link, hosted on the Reed College server: https://shiny.reed.edu/s/users/gmcginnis/AirVizViewR/

Overview

The goal of AirVizViewR is to provide a user-friendly web interface for interacting with the AirVizR package.

The AirVizR package and corresponding AirVizViewR web interface were written by Gillian McGinnis during the summer of 2021, and is actively being updated.

All sections of the tool are annotated for ease of use.

Project information (“Welcome” tab)

This tab provides an overview of the dashboard, as well as authorship information, acknowledgments, a disclaimer, and links to related resources.

To begin using the tool, visit the “Inputs” tab.

Accessing data (“Inputs” tab)

The dashboard requires location and temporal inputs in order to load the spatio-temporal data set of interest. The larger the set, the longer it will take to be loaded. Data limits have been placed in order to prevent server overload.

A boundary box using W,S,E,N numeric-form coordinates is required. For example, -122.65, 45.46, -122.60, 45.50 corresponds to a portion of the Portland OR metro area.

A date range is also required. It is recommended to keep this date range under 1 month, as the data is downloaded with maximum granularity (which reports every few seconds).

Monitors can be selected to be only indoor or only outdoor. The default is both.

Optional inputs

An optional input is a label filter, which allows for monitors in a specified area to be selected only if they match a corresponding string. For example, NCA would filter only for monitors who have the term “NCA” at any point in their name.

Furthermore, if one is selecting an area along state boundaries but would only like to download the data from one state, a state code filter can be applied.

After following the instructions for inputs (and adding any optional inputs as desired) and pressing the emphasized button, a map will first be generated in order to verify that the monitors of interest are correct. If successful, the next step is to have the tool load the time series data of interest. Once the data has loaded, a summary table will appear, and the true values can be graphically visualized in the “Visualize” tab.

Creating data visualizations (“Visualize” tab)

Behind-the-scenes, R will be constructing data visualizations based on the provided data inputs and using functions from the AirVizR package. Four different visualization options are available, each with their own customization.

Selecting the data to be plotted will change the granularity of the values (with the exception of the hourly single heatmap, which will only use hourly data). Generally, the higher the granularity (i.e., the closer to “full”), the longer the data will take to visualize.

Variable information

The variable of interest allows for the selection of the values to graph.

PM2.5 is Particulate Matter with a diameter <2.5 μm.

For PurpleAir values, the different CF codes are the correspond internal average particle density values using one of two mass concentration conversion options: CF=1 for indoor PM, and CF=ATM for outdoor PM. Both are available for visualization on the dashboard, regardless of reported monitor location. More information can be found on the PurpleAir FAQ.

Correction factors are incorporated from the Environmental Protection Agency (EPA) and Lane Regional Air Protection Agency (LRAPA) via calculations using the reported PM2.5, temperature, and humidity values. Both are available as variables of interest for visualizations. The EPA factor was based on US-wide PurpleAir data and revised in late 2020 to incorporate adjustments for high-PM events (such as forest fires). The LRAPA correction was established in the Pacific Northwest in order to accommodate the unique airshed (the PM of the region is proportionally comprised of more woodsmoke than other areas of the country). It should be noted, however, that the LRAPA correction factor cannot be applied to values >65 μg3.

In addition to PM, other reported values are available for visualization, using different color palettes in order to provide greater distinction. Reported temperature (in both ℃ and ℉) is available, as well as humidity (as a percentage).

Map

The map visualizes spatio-temporal atmospheric data using points on a map, colored by a specified variable. It is generated via the map_stad() function from AirVizR. Below is an example:

Change the background image using the map type input. If the streets appear to be fuzzy, increase the map zoom value. Adjust the sizes of points using the point size.

Heatmap

The multiple heatmap visualizes temporal atmospheric data for multiple monitors using a heatmap. It is generated via the heatmap_cross() function from AirVizR. Below is an example:

Optionally drop incomplete sets (i.e., monitors with missing or otherwise removed data).

Hourly heatmap

The hourly heatmap visualizes hourly atmospheric data for a single monitor (selected via the site of interest input) using a heatmap. It is generated via the heatmap_single() function from AirVizR. Below is an example:

As with the regular heatmap, one may drop incomplete sets (i.e., monitors with missing or otherwise removed data). As mentioned before, select the monitor of interest using the site of interest setting.

Classic time series

The time series visualizes temporal atmospheric data for multiple monitors, with optional minimum and maximum labels and a moving average. It is generated via the ts_line() function from AirVizR. Below is an example:

Select or remove monitors using the sites of interest setting; it should be noted that this does not remove the monitors from the shadowed time series lines (i.e., those in gray), but instead selects for those that will be spotlighted and labeled from the set. Aesthetic customization allow for the addition of data points as dots, extrema labels, and an addition of an averaged trend. The colors for each extrema and/or the average trend can also be customized.

Further customization

Each of the four visualization options have their own custom settings, as described below each example figure above.

A notable customization that is available for all four options is the “color cap”. If a certain value or values are “washing out” the color palette on a visualization (as with the “multiple heatmap” above), a color cap can be applied which will color all values at or above a specified value to a different, discrete color.

Below is an example with the cap value set to 50, and the color for said cap set to green:

Acknowledgments

Special thanks:

  • Dr. Juliane Fry, Reed College
  • Mary Peveto, NCA
  • Micah Bishop, NCA
  • Dr. Christine Kendrick, City of Portland
  • Lance Giles, Lane Regional Air Protection Agency (LRAPA)
  • ACSI Air Toxins Subcommittee, Multnomah County
  • John Wasiutynski, Multnomah County
  • Knowledge Murphy, Multnomah County

About

Shiny dashboard for AirVizR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages