US Air Quality: An R Shiny App for Planning Health
In the time it took you to read this sentence, you probably took a breath without thinking about it. Breathing is essential for our survival. However, the air we breathe is not always pure and can be contaminated with various pollutants that can harm our health. The Air Quality Index (AQI) is a measure of how polluted the air is and provides information on the concentration of pollutants such as particulate matter and ozone, among others. Understanding AQI data can help people take necessary measures to reduce exposure to air pollution and improve their quality of life. To that end, I created an app to make that data easily accessible.
Air pollution measured via AQI has been linked to a variety of health problems, such as respiratory issues, allergies, and even heart-related ailments . Informed decisions enable us to take appropriate actions to protect the well-being of ourselves and those around us. When traveling, knowing air quality trends, enables us to plan activities, choose appropriate accommodations, or select healthier locations, reducing exposure to harmful pollutants and promoting our overall health.
The data was first obtained from the EPA and is now available on kaggle. In addition to the typical features in this data set (AQI, location data, date), it draws on census information to add population and population densities for each of the cities. In service of speed of the app, the dataset was pruned from over 40 years of data to the timeframe 1/1/2016 - 5/31/2022. The data is spread over 523 different cities in the US. This dataset tracks five different pollutants: Ozone, PM2.5, PM10, NO2, and CO, with respective frequencies of 53.9%, 25.4%, 8.2%, 6.4%, and 6%.
Unfortunately, this dataset lacks temporal consistency. That is, at some locations, there may be a reading every day; at some, every few days; at others, for only part of the year. To compensate, we include options to group entries by month. This is sensible, as we expect some level of seasonality due to events such as forest fires.
This app allows us to take air quality into consideration when planning a visit to a region of the US. Selecting a month reveals a colored chart of the country corresponding to average AQI.
During September, for instance, we see that a large part of the West coast records poor air quality, indicating that sensitive people may want to avoid traveling to that region during this time. In contrast, the northern Midwest has very clean air during this time, so that may be a better choice for late summer to early fall.
We can also view the distribution of points more directly to compare cities or states. Compared to Michigan, Minnesota has a smaller average but a larger variance in September.
To easily compare multiple specific regions at once via multiple metrics, we can use the Best and Worst Locations tab.
While all of these locations typically have clean air, Houghton, MI is the winner in the vast majority of these metrics. This remains true even when looking at the data through a date range.
This app is a valuable tool for making informed decisions regarding health, moving, and travel plans based on air quality. By understanding AQI data, users can identify regions with healthier air and minimize their exposure to harmful pollutants. Clean air is especially important for people suffering from respiratory conditions like asthma or COPD. Management of air quality exposure not only benefits their personal well-being but also raises awareness about air pollution and its impact on our lives. As more people become informed and take action, we can collectively work towards a cleaner, healthier environment, permitting healthier selves as well.
 Brook, R. D., et. al (2010). Particulate matter air pollution and cardiovascular disease: An update to the scientific statement from the American Heart Association. Circulation, 121(21), 2331-2378.
 Khreis, H., et. al (2017). Exposure to traffic-related air pollution and risk of development of childhood asthma: A systematic review and meta-analysis. Environment international, 100, 1-31.