MIDS Project ‘FairAir’ Improves Air Pollution Monitoring
By: Berkeley I School
Tags: AI, Ischoolprojects, Pollution, Data Science, Machine Learning

MIDS Project ‘FairAir’ Improves Air Pollution Monitoring

Air pollution cuts short 4 million lives every year. Unfortunately, the neighborhoods with the most pollution are also the neighborhoods where the air quality is monitored the least.

MIDS students Ben Arnoldy, Jake Miller, Sameed Musvee, Mark Paluta, and Angshuman Paul set out to change that by creating FairAir, a tool for identifying locations of high air pollution. It uses artificial intelligence to recommend the best places to put new sensors in order to provide air quality data to disadvantaged communities.

The FairAir map highlights registered polluters (red triangles), predicted pollution, and optimal locations for new sensors (green pins).

Tell us about FairAir.

Ben: FairAir shows environmental activists where air pollution is likely to be worse in a city and recommends where to deploy low-cost sensors to improve pollution mapping. Sensors are currently clustered in wealthier neighborhoods. FairAir uses a machine learning model to create “virtual sensors,” highlighting where new monitoring and remediation are most needed.

Sameed: With the price of air pollution sensors falling and recent wildfires in the San Francisco Bay Area alerting people to the problem, community groups and residents are starting to buy home sensors from companies like PurpleAir.com. Suddenly there is a lot of new data, and it’s no longer dependent on government decisions about where to monitor the air.

What inspired your project?

Ben: In 2018, the Camp Fire choked the Bay Area with smoke. Like many people here, I was worried about what I was breathing. I happened to be running a field experiment for a MIDS class at the time in a boba tea shop. Between gathering data on customer tipping behavior, I would check the air quality by going to PurpleAir.com and I began saving the data in case the shifting smoke was affecting foot traffic to the shop.

The PurpleAir data intrigued me. There was a lot of it — but mostly in wealthier areas, where private citizens could spend $250 to buy a sensor and add it to the network.

That bothered me: I knew from my work at Earthjustice, an environmental law firm, that pollution tends to be concentrated in poorer neighborhoods and its effects cut short people’s lives. And I knew from my time as a journalist based in New Delhi, India, that when the American embassy began monitoring and publicizing air quality data, pressure mounted to address some of the worst air in the world.

I wanted to see if the PurpleAir data could be combined with other data to help people fight air pollution — especially where it is worst.

Sameed: As an outdoor enthusiast, I spend a lot of time hiking and running outdoors. The recent Bay Area wildfires alerted me to the fact that government sensors that are intentionally placed far away from pollution sources cannot be relied upon. For example, even with smoky air, government sensors showed air quality levels in my area as “Good” and “Moderate.” Thus I was attracted to the idea of using PurpleAir sensor data to really understand air quality in my neighborhood.

Mark: When I heard Ben pitch this project at the beginning of the course, I knew I had to rank it as my top choice to work on. I’ve been fortunate enough to live in neighborhoods with clean air my whole life, but a summer in Beijing and wildfire season in Seattle have reminded me how much I take clean air for granted.

What was the timeline or process like from concept to final project?

Mark: Students only have three months to complete the MIDS degree capstone. That meant our team of five had to be organized and disciplined to finish on time. We used an agile framework with one-week sprints to manage work. We kept track of everything using Trello. Early work focused on building a data pipeline, exploring the data, and conducting user research. We brainstormed as many possible users as we could — activists, community organizers, families, law firms, and more. We reached out within our networks to have conversations with these groups and refine our idea based on their feedback and needs. Later work focused on training the machine learning model, building the user interface, and circling back to users for feedback.

How did you work as a team? How did you manage to work on your project as members of an online degree program?

Jake: I was the only team member based on the East Coast, but fortunately I’m somewhat of a night owl so I didn’t mind having our weekly project video calls last until midnight. In general, the team was very respectful of each other’s schedules and external commitments, whether it was travel or family or anything else that would require offline time. Slack was our primary mode of communication and kept the dialogue going between our Tuesday night sprint calls.

Mark: We had product and project manager roles and leads for various deliverables, but we all helped out when one of us was swamped with responsibilities. Spanning several time zones sometimes required some creativity; at one point I video called into sprint planning from a kayak rental shop in New Zealand, and Angshuman and Jake delivered their segments of our final presentation from India and South Africa!

How did your I School curriculum help prepare you for this project?

Angshuman: The I School curriculum laid the foundation that helped us execute the project holistically. We drew on a lot of the key concepts of our coursework: exploratory data analysis from W200, the importance of research design and storytelling from W201, understanding of biases, insights into the various machine learning models from W207, the principles of good visualizations from W209, and executing data pipelines at scale from W205.

Mark: One of the biggest skills I will take with me from MIDS is learning to navigate unfamiliar space. Nobody on our team had much experience in Javascript. But with a few weeks to go and a predictive model under our belts, we still had to build an entire web application to deliver our modeling results in a dynamic, user-friendly, and interpretable format.

We not only built the ship as we sailed it, but had to learn how to build the ship as we sailed it.

Jake: The Machine Learning at Scale class (W261) was very valuable preparation. Late in the term, we decided to expand the geographic area where we were mapping predictions. The larger area created a volume of data that no longer fit in memory for the many preprocessing and feature engineering steps that our pipeline required. We initially tried to refactor our code with Dask, but its performance and functionality was still lacking. After lots of sunk effort, we finally rewrote a large preprocessing task in PySpark and were able to retrain on the larger set. We would not have been able to do without the experience — and understanding about scale — gained from Kyle and the 261 team.

Do you have any future plans for FairAir?

Angshuman: We are open to expanding to other geographies, but we are going to keep our future development user-centric. We have an organization in the Bay Area that is interested in using our tool that we plan to take feature requests from. Salt Lake City has notoriously poor air quality and an abundance of PurpleAir sensors, and we have a contact there interested in our tool, so we are considering a second deployment there.

Ben: We initially focused on trying to combine wind data with the PurpleAir data to trace pollution back to its sources. This proved to be more than we could take on in one semester. The wind does not shift direction in the Bay Area as much as we expected, making the inference back to sources more difficult than expected. However, a researcher with one of the environmental groups that we consulted is interested in working with some of us on tackling that problem again. We are always open to hearing from other developers or environmentalists who are excited about our tool and would like to contribute in any way.

How will this project make an impact?

Sameed: One of our favorite aspects of this project is that it holds the promise of greatest impact for underserved communities, since those neighborhoods often have the fewest air quality sensors and the dirtiest air. It’s rare that a tool can actually provide more information in areas where there is less data.

Ben: As part of our user research, I took a “toxic tour” of a neighborhood not far from where I live in Oakland to understand what difficulties activists were facing and whether data could be useful. A metal foundry, a crematorium, and a stone crusher all spewed pollution shockingly close to homes and schools. The residents talked of health problems and environmental racism as politicians and regulators met their complaints with indifference. Activists in the community have gone to heroic lengths to quantify the air problems: from counting diesel trucks, to conducting DIY air tests with plastic buckets, to keeping detailed time logs of strange smells. I hope FairAir can contribute to long-running work like this to make change.