Find Your AQI - Air Quality App

(Video demo below)

Quick Facts:

App Name: Find Your AQI

Purpose: Provide current air quality data from nearby sensors or any location worldwide. The app also displays current temperature and weather (icon).

Components used in this project: Web API, Location Sensor, Speech Recognizer, Text-To-Speech, Data List Viewer, Local Data Source, Map.

Things I had to learn for this project: What PM2.5 particulates are, conversion equations for PM2.5 to AQI, how to access Web API data, how to parse JSON data, how to calculate the distance between two points on the globe, how to design a custom list viewer layout.

Related projects: I created a physical AQI display featuring the PMS5003 sensor that PurpleAir devices use and connected it to an Arduino with a humidity & temperature sensor and an 8-segment 2-digit display for live readouts. I used some of the same mathematical equations to convert PM2.5 to US EPA AQI values. It runs on a 9V battery and is small enough that it can easily be carried around as a mobile air quality station.

Those who helped with advice, demos and troubleshooting: @manyone, @actech, @jared, @Darren, @drted, @Domhnall, @jane and others I’m sure I’m forgetting.

Back Story:

I’ve been working on an app called Find Your AQI for the past three months. Where I live in California, wildfires were a constant concern this summer. My friends, family and colleagues would check PurpleAir.com for the AQI (air quality index) near them before venturing outside. Often, the air quality in the San Francisco Bay Area was “unhealthy.” You can see the U.S. EPA air quality levels here.

PurpleAir.com is a great resource for air quality data but there isn’t a mobile app for it. There are apps that will provide AirNow.gov data (including asking Siri, Alexa, etc.) but it turns out that data is not very useful for learning about “live” air quality values near you. They are much better for aggregate data over a period of hours or days. Also, because AirNow sensors are so expensive, there usually is only one per county. Our county is 828 square miles so having a single reading for the county is just not that helpful, especially when air quality values can differ by a hundred points or more within a few miles from your home or workplace.

So I created Find Your AQI. It lets you get your current location from your phone or type in a location anywhere in the world (including place names thanks to the Google Places API… want to know what the air quality is at Disneyland?) or use voice recognition to speak a location (in which case it speaks the city name and AQI value back to you).

Behind the scenes, the app is doing tons of calculations to find the sensor nearest you and then to convert the reported particulate amount (PM2.5) to a U.S. EPA AQI value with an associated description (“Good,” “Moderate,” etc.).

This is all pretty fast! My first real working version of the app took about 15 seconds to fetch nearest sensor data. The current version takes more like 2-5 seconds.

I haven’t published this to the app stores yet. I’m concerned about the price of API calls if I release it to the general public. I’m also not sharing the project link for similar reasons. But I have published it as a web app and shared the link with friends, family and colleagues who say they find it very useful.

Video demo:

3 Likes

Epic!

3 Likes

awesome!
i like how you specified the components you used and the concepts you learned in building this app. we all should not lose the value of that. more power to you!

3 Likes

Congratulations! It definitely has a super useful purpose, and the UI is fantastic.

3 Likes

This is fancy! Great work.

2 Likes