How Many Cigarettes Did We Smoke on the West Coast This Week?

I made an AQI to cigarettes converter in React to find out

Jasmine Webb
4 min readSep 18, 2020

On September 10th I left my bedroom and the safety of my air purifier to have lunch with my housemates. An hour later I was having my first asthma attack in years. That night the AQI in Portland dipped into the purple zone. The next day, on 9/11, I had 6 people spend the day in my room huddled around my air purifier while the AQI slipped off the charts.

Spending the weekend refreshing the evacuation maps and PurpleAir.com, I realized I know very little about the AQI or Air Quality Index. AQI is a nifty tool used by environmental scientists to communicate health risk to laypeople like me.

https://www.epa.gov/sites/production/files/2014-05/documents/zell-aqi.pdf

Another nifty tool scientists have used to communicate the lasting health impacts of bad air is in cigarettes. The lethality of a cigarette is something most people are familiar with. Framing health effects in terms of a physical object is a great way to visualize something so abstract.

So I wondered how many cigarettes of health impact my friends were avoiding by staying over at my house for the weekend.

What’s Out There?

My first course of action was to see if anyone had made a calculator already. There were a few, most prominently an app called Shit, I Smoke. Unfortunately it’s a phone app and I didn’t feel like clearing space on my phone just for something I’d use once. (Update from 2023: they have an online version now! Check it out)

There’s Smog Calculator but I didn’t understand what any of the units meant (at the time).

My Calculator

In the end, because I was too lazy to use either of the available options, I ended up doing way more work and building one myself.

My calculator is simple: it takes the AQI + hours of exposure, and tells you what the impact to your health is in terms of cigarettes.

Here is a live link

And here is the source code

How Does It Work?

I quickly discovered that researchers don’t agree on how to calculate air quality to cigarettes. This article from Berkeley Earth had calculated the health impact of a cigarette and compared it to the observed health impacts of bad air quality in China. The research cites another study which makes the comparison based on amount of particles inhaled. I decided to go with the former method because I’m more interested in showing the long term health impacts. Particles from the air may not have the same impact on your lungs as particles from cigarettes.

So based on this research, one cigarette per day is equivalent to a PM2.5 particle concentration of 22 μg/m3. Particle concentration is how many bits of stuff are in one cubic meter of air. You calculate AQI based on this.

Now I needed to turn AQI back into particle concentration. Unfortunately, you lose a bit of information in this step. It’s probably why the other calculators all had you put in the particle concentration instead. Still I thought it was important because most people know what AQI is but not “μg/m3".

To make this conversion I reversed the equation for turning particle concentration to AQI by solving for particle concentration. In the end I checked my work against Air Now’s AQI converter and ended up using the exact same equation as they do.

The Tech

My AQI to Cigarettes calculator is a single-page static React app hosted on GitHub pages. Why React? Mainly because of the easy deploy tools and integration with Semantic UI. I also much prefer to work with TypeScript over vanilla JS and this is easy to set up and publish using create-react-app.

I love create-react-app for spinning up quick little weekend projects. I also love GitHub pages for static sites.

Impact

I hope this puts long term health impacts into perspective.

Some Oregonians still worked this weekend, most without a properly fitted N95 mask. Working 40 hours this Thursday-Tuesday when AQI was in the 400s is like smoking 38 cigarettes — that’s assuming they can go home to good air quality. Houseless people, including many of the half a million Oregonians displaced due to the wildfires, have been exposed to at least 110 cigarettes during all of this.

Climate change is only starting to ramp up and is projected to get much worse in the coming years. I can only ask that you vote for and donate to candidates who will champion the climate cause.

I would also ask anyone with the means to help now and donate directly to those affected. I can recommend the following:

  1. Street Roots: a paper in Portland which is written and distributed by houseless folks. Right now they’re trying to raise $13,000 which goes directly to helping people on the streets.
  2. Verified GoFundMes for people displaced by the fires.

Thanks!

Cover photo by Jens Johnsson on Unsplash

--

--