MasterClass: Air Quality Data Visualization with R Studio & Packages

R Studio and its packages are used by hundreds of thousands of people to make millions of plots. I use it to compare air sensor data from different air quality monitors/sensors or to visualize air pollution levels.

In this article we will explore both how we can visualize air quality data from publicly available sources and how you can create statistical correlations between different pollutants or different sensors to find the correlation coefficient or correlation of determination.

First: Get the Right Packages

Packages are collections of functions, data, and compiled code in a well-defined format, created to add specific functionality. Here are some of the packages that we will install inside RStudio and use.

#You can either get ggplot2 by installing the whole tidyverse library
install.packages(tidyverse)

#Alternatively, install just ggplot2
install.packages(ggplot2)

#saqgetr is a package to import European air quality monitoring data in a fast and easy way
install.packages(saqgetr)

#worldmet provides an easy way to access data from the NOAA Integrated Surface Database
install.packages(worldmet)

#Date-time data can be frustrating to work with in R and lubridate can help us fix possible issues
install.packages(lubridate)

#Openair is a package developed for the purpose of analysing air quality data
linstall.packages(openair)
Read More »

Webinar: Air Quality Data Analysis, Visualization and Statistical Modelling

Air quality analysis is a complex task that requires a variety of tools and methods for successful completion. One such tool is R language and the IMS software by Particles Plus. This combination of software is well suited for air quality analysis due to its comprehensive statistical capabilities, ability to integrate with existing air quality data sources, and its powerful visualization capabilities.

Wood Burning Patterns!

I live in an area where wood burning is an unfortunate “cozy” habit for the people around me. So, I decided to see if patterns appear after monitoring the ambient air quality for 30 days in order to identify if there is any window that will allow me to open the windows and get some fresh & clean air. For the sake of simplicity, I will use only PM2.5 values.

I don’t mind if I have to wake up at 3:00 AM in order to allow some outdoor air to come inside and dilute some VOC and CO2 that build up. Indoors, PM2.5 concentrations are kept well under 5μg/m3 because I run the air purifiers 24/7. By the way in a recent, poster the position of the air purifier inside the house plays an important role in how well particles are captured.

Anyway, let’s jump into the data I collected and analyzed.

Read More »