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 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. is a great resource for air quality data but there isn’t a mobile app for it. There are apps that will provide 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:




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!


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


This is fancy! Great work.


It looks great, @tatiang. I really like some of the UI assets you created / used.

Are you comfortable sharing the block(s) you used to create your colored bg’s? I’d like to do something similar with a conditional state, but haven’t found a good tutorial yet.

Or, if you know of a community topic here that I can use as a reference, that would be appreciated, too.


Thank you! The method I used was referred to by @jared as “painting the DVL.” This post has a link to an explanation of that as well as another method (cloning):


Awesome! Have a link that you can share for the app? I wanna test it, out of my own curiosity.

I never released it on the app stores because it would have been too many API calls for PurpleAir. I did publish it as a web app for family and co-workers. But right now, it’s not published. I’d need to put some work into it to re-publish it because some of the API properties changed name and position and it’s not working.

1 Like