# Find Your AQI - Air Quality App

**URL:** <https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836>\
**Category:** Promote your App\
**Created:** [November 27, 2020, 2:56am UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836 "2020-11-27T02:56:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [November 27, 2020, 2:56am UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/1 "2020-11-27T02:56:27Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/8/e893c57ea680bbd44e429c94d200685958ca075a.jpeg)_(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](http://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](https://www.airnow.gov/aqi/aqi-basics/).

[PurpleAir.com](http://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](http://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:**

[![](https://img.youtube.com/vi/deImTXCDj00/maxresdefault.jpg "Find Your AQI demo") ](https://www.youtube.com/watch?v=deImTXCDj00)

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 27, 2020, 3:14am UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/2 "2020-11-27T03:14:15Z")

</div>

Epic!

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [November 27, 2020, 3:29am UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/3 "2020-11-27T03:29:22Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [November 27, 2020, 3:32am UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/4 "2020-11-27T03:32:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![darren](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/darren/32/69854_2.png) [@darren](https://community.thunkable.com/u/darren)\
**Post date:** [November 27, 2020, 3:32pm UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/5 "2020-11-27T15:32:11Z")

</div>

This is fancy! Great work.

---

<div class="post-metadata">

**Author:** ![deanmachine](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/deanmachine/32/138759_2.png) [@deanmachine](https://community.thunkable.com/u/deanmachine)\
**Post date:** [October 9, 2022, 8:24pm UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/6 "2022-10-09T20:24:48Z")

</div>

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.

Thanks!!

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 9, 2022, 9:31pm UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/7 "2022-10-09T21:31:35Z")

</div>

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):

> [@Data Viewer - show/hide icons based on database value](https://community.thunkable.com/t/data-viewer-show-hide-icons-based-on-database-value/2061410/2):
>
> Conditional binding with the data viewer list is not possible at this time. Your options are to [paint the DVL](https://community.thunkable.com/t/fun-share-dvl-hack/1665645) or to use a [layouts component and cloning.](https://community.thunkable.com/t/join-us-in-beta-testing-the-new-layouts-component-rows-columns-for-the-drag-and-drop-interface/1970795)

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [October 10, 2022, 2:12am UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/8 "2022-10-10T02:12:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 10, 2022, 2:27am UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/9 "2022-10-10T02:27:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [October 10, 2022, 8:10pm UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/10 "2022-10-10T20:10:07Z")

</div>

Ok

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:21pm UTC](https://community.thunkable.com/t/find-your-aqi-air-quality-app/1001836/11 "2024-11-08T12:21:25Z")

</div>


