IoT-driven monitoring of Air Quality during the 2018 California Wildfires
Over the past few weeks, the Camp Fire in Northern California and the Woolsey Fire in Southern California have devastated people and property. There has been tragic loss of life in the town of Paradise, and California’s firefighters remain tasked, once again, with the difficult job of containing and extinguishing the flames. What no one can contain, though, is the spread of hazardous wildfire smoke.
I was out of town when the smoke arrived, but on return to San Francisco several days later, the smoke in the air was as bad as I feared. Last year I wrote, “2017 was a bad year for fires in California,” which discussed the tools I used to collect and analyze the air quality data. I put those tools to use again in order to understand the air quality both inside and outside of my home.
Air Quality Basics
Air quality is measured with the Air Quality Index, or AQI. The AQI corresponds to the concentration of 2.5 and 10 micron particles in the air, usually referred to as PM2.5 and PM10. The “PM” stands for ‘Particulate Matter’.
Generally speaking, PM2.5 is the key metric to watch during wildfires, as these small particles are produced by combustion. These tiny particles stay in the air for a long time, can deeply penetrate the lungs, and significantly impair lung function. PM10 particles are harmful as well, but their story ends with the lungs – not so with PM2.5, which can pass right into your bloodstream.
The EPA maintains the website AirNow which tracks AQI throughout the United States, and indicates air quality ranging from ‘Good’ to ‘Hazardous’. Air quality is measured by the EPA (and others) with sensors deployed at locations around the country. In recent years, these sensors have become commoditized, allowing the general public to set up their own. PurpleAir has become a popular provider of these sensors, offering a low-cost version featuring miniature lasers. These sensors upload the air quality data to a map which shows air quality for thousands of locations. If you’ve heard the term ‘Internet of Things’ (or IoT) before, this map shows one way of harnessing this type of information.
Initial Data Collection
I have two PurpleAir sensors which can monitor PM2.5: a PA-I-Indoor and an PA-II Outdoor. I’ve had them up and running since last year’s fires, which were in October of 2017. Based on this data I purchased several HEPA filters to keep the air in my home free of particulate matter.
These air sensors are extremely sensitive; they can detect air quality changes from not just wildfires, but common household appliances. Shortly after I started using the indoor sensor, I discovered that my ultrasonic humidifiers produced large amounts of PM2.5. They also pick up air quality changes when a hairdryer is in use, or something is burning in the oven. So if you decide to monitor your indoor air quality, don’t be surprised if you find it’s worse than you expect from seemingly innocuous daily activity.
My HEPA filters were turned off to save electricity when I was away. I thought that my house was weather-sealed well enough that any particulates would stay outside. I was wrong.
Based on the sensor readings, I could see the current AQI level that I would walk into at home, and it was not healthy. The Air Quality Index outside was 284, solidly in the ‘Very Unhealthy’ band, and the air inside my house — which had been sealed shut since the fire — was AQI 158, designated as ‘Unhealthy.’
“My HEPA filters were turned off to save electricity when I was away. I thought that my house was weather-sealed well enough that any particulates would stay outside. I was wrong.”
Clearing the Air
First things first; I turned on my HEPA filters and tracked the indoor AQI until the air inside was brought down to a safe-breathing level. It took an hour to bring the AQI level down to yellow, and then another 30 minutes or so to get it to green.
Once the indoor air quality dropped to an AQI of less than 50, I turned my attention to analyzing the sensor data. I wanted answers to the following questions:
- How effective are HEPA filters at keeping the indoor air clean even when it gets really bad outside?
- I have a HEPA filter in my garage too; is that as effective as the ones inside the house?
- How bad is the air quality outside? Does it measure up to the anecdotal evidence in the news and on social media?
- How does the PurpleAir sensor data compare with the sensor data published by the Bay Area Air Quality Management District?
To answer these questions, I collected both PM2.5 and PM10 data as histograms using Circonus. Circonus is a monitoring system that allows users to collect data directly from IoT devices as well as websites and other technology infrastructure. Circonus can ingest data in most common formats, which makes it capable of integrating with just about any device out there. This allows me to use Circonus’ heatmap visualizations, as well as run statistical analyses on the data.
Let there be Data
My sensors collected 24 hours worth of data, and I displayed both the indoor and outdoor sensor readings on one heatmap, as shown below. The green line is the outdoor sensor, the blue line is the indoor sensor.
The AQI levels are displayed on the Y axis, using a logarithmic scale; the relation between PM2.5 particle count and AQI is not a linear one, so this approach produces the best visualization.
With this heatmap visualization, the answers to my questions are clear:
Question 1 – HEPA Filter Effectiveness
My question regarding the effectiveness of my indoor HEPA filters is answered with this heatmap. The blue line (indoor AQI) stays below the yellow ‘AQI Moderate’ level for almost the entire graph. HEPA filters are rated by the amount of square footage that they can cover, and mine are more than sufficient for the square footage of my house. The indoor air quality remains great even when the outdoor AQI goes above the ‘AQI Hazardous’ level (more on that level later). Since my house is older, it is not sealed as well as a newer house or most high-rise apartment buildings, and the filters had to work against bad air leaking in.
Question 2 – Is the air in the garage safe?
I have a HEPA filter in the garage, so I wondered if it was safe to exercise there. The garage has several spots where air can enter, especially along the sides of the rollup garage door. To measure this area, I moved the indoor sensor to the garage for several hours. I added an annotation to the heatmap (marked by the thick blue horizontal line at the top of the graph) to indicate the time when the sensor was in this location. It is clear from the heatmap that the garage air quality varied between orange (AQI Unhealthy for Sensitive Groups) and red (AQI Unhealthy). If you look closely, you’ll see a bump in the middle of the range where I opened the garage door for several minutes. The garage air quality was cleaner than the outside, but nowhere near as good as inside the house.
Question 3 – Just how bad did the air get outside?
In a nutshell – the air outside was record-setting bad. The outdoor sensor recorded a maximum of ~288 micrograms per cubic meter at about 2pm on November 16th, 2018, which corresponds to about 336 on the AQI scale. At least 10% above the ‘AQI Hazardous’ level. I’ve only seen this reading a couple of times when I was barbecuing. Based on the data: the air outdoors was at the level of being surrounded by barbecues.
Question 4 – How did my sensor data compare to government AQI maps?
The Bay Area Air Quality Management District (BAAQMD) has high-end sensors spread around the SF Bay Area which report to various government agencies. They reported a maximum AQI value of 271 at about 2pm on November 16th. Why did they report AQI 271, but I measured AQI 336?
BAAQMD has one air sensor in San Francisco, and a number of others around the Bay Area. Meanwhile, there are several dozen PurpleAir sensors in San Francisco, monitored by IoT enthusiasts like myself.
Readings from PurpleAir sensors can vary by +/- 50 AQI, but PurpleAir has stated that their sensors are roughly as accurate as other laser based sensors. Given the hilly topology and microclimates in San Francisco, a possible explanation may be that AQI varies enough locally to account for these discrepancies. A PurpleAir sensor in the same location as the BAAQMD sensor would help answer this question.
Data Science is Here for Everyone
Democratization of technology is leading to democratization of data. The Internet of Things has provided hobbyists with the instruments that have long been only available to scientists, but with the added power of crowd-sourcing the data gathered by those instruments. The tools to monitor environmental data are available to any end user with only a few hundred dollars worth of sensors and an internet connection. With smart monitoring, we can ask and answer the right questions of the world around us.