The openair package is specifically designed to plot air pollution data. This tutorial will give a brief introduction to many of the plotting functions in openair.
This tutorial will cover the following openair functions.
Before proceeding, please follow our short tutorial.
Look at the examples given and try to understand the logic behind them. Then, try to solve the exercises below using R without looking at the answers. Then check the solutions to check your answers.
Load the chicago_air dataframe. Use devtools::install_github(“NateByers/region5air”).
Supply the correct time zone for this data-frame.
Feed the first four columns of the data frame to the summaryPlot() function.
Load the chicago_wind data frame/.
Create a “date” column with a POSIXct class.
Rename the columns using the rename() function from dplyr.
Feed the data frame to the windRose() function.
Split the data frame by time periods.
Make a similar plot that will display pollutant concentrations in relation to wind direction.
Calculate percentile levels of a pollutant and plot them by wind direction.