Archive for January, 2009

why you can’t average APIs

Thursday, January 15th, 2009

The Asia Society’s Room with a View website I mentioned in my last post is excellent. However, they have one indicator of air quality that is a little problematic, and here I’d like to explain why. The indicator I’m referring to is average API (which they call “average pollution”).

Mathematically, it doesn’t make sense to average APIs. This is because the conversion from pollutant concentration to API is non-linear, as shown in this graph:

api vs pm10

Why this complicates averaging is best explained through an example:

Consider three different days with APIs 25, 100, and 250. The average API is 125, which corresponds to a PM10 concentration of 200 ug/m^3. Unfortunately, though, the actual average PM10 concentration for those three days is not 200.

Our three days with APIs 25, 100, and 250 correspond to PM10 concentrations of 25, 150, and 385 ug/m^3, respectively. The average PM10 is 187 ug/m^3, which corresponds to a real “average” API of 118, several points lower than that estimated using the other method.

Because of the non-linear conversion, to get an accurate “average API,” we have to convert to PM10, average those, then convert back to API.

The difference isn’t huge, and I do think that average APIs may occasionally be useful for snapshot, comparative indicators of the air quality of a given time period (as used by the Asia Society). However, it should be understood that this method usually gives a higher (worse) estimate of air quality than reality, and the average should never be used to convert back to pollutant concentration.

Detailed equations for converting back and forth from API to PM10 may be found at the bottom of this post.

daily photos of beijing’s air quality

Thursday, January 15th, 2009



room with a view

The Asia Society has an excellent website that features daily photos of Beijing’s air, along with API info and a great video on the challenge of parallel economic development and environmental protection.

summary of beijing’s 2008 air quality

Wednesday, January 14th, 2009

Happy New Year! I thought I would start off the year with a brief look back at Beijing’s air quality during 2008.

On December 31st, Xinhua reported that Beijing had achieved 274 “Blue Sky Days” in 2008. This was well in excess of the 2008 goal of 256, and even well above the 2009 goal of 259. But what does it mean in terms of air quality and human health? Let’s take a closer look at the data to find out.

First of all, according to my tally, Beijing actually only achieved 272 Blue Sky Days in 2008, with one data point (9/6) missing. Even if we assume the 9/6 sky was blue though, that only amounts to 273, not the reported 274. What’s going on here? FYI, I performed my tally by first downloading Beijing’s 2008 API data (available by querying MEP’s datacenter) then counting the number of days with API 100 or below. Am I doing something wrong here?


Update 1/15/09: In reviewing the data, I realized that MEP’s 2008 API database is missing two data points – 9/6 and 6/4. Assuming both of these days were Blue Sky Days yields 274. I missed this the first time around because I forgot that I should be looking for 366 total data points (leap year!) not 365.

In any case, as I have written about before, the “Blue Sky Day” metric is problematic for several reasons. Perhaps what bothers me most about it is that it tells us nothing about actual air quality; increasing annual numbers of Blue Sky Days does not necessarily mean better air quality(1). To evaluate air quality, we need numbers for daily / annual concentrations of air pollutants. Although the Beijing EPB publishes annual pollutant concentrations in the Beijing Environmental Annual Reports, the 2008 report won’t be available until this summer. So we need to improvise:

Starting from the database of 2008 API values, I converted back to daily PM10 concentrations using the formulas at the bottom of this post. I assume that the primary pollutant on all days is PM10(2). Averaging over the year I get:

2008 Average PM10 concentration for Beijing: 123 ug/m^3.


Update 10/29/09: Official statistics have been released, and show a 2008 annual average PM10 concentration of 122 ug/m^3.

The good news? This is a 17% improvement over last year. The bad news? The PM10 concentration is still over six times higher than the WHO annual target of 20 ug/m^3:

beijing pm10 99 08

During the Olympics, Beijing saw a 50% reduction in air pollution as the city enjoyed its cleanest air in ten years. Clearly, the success of the anti-pollution campaigns was a driving force behind 2008’s relative improvement over years past. At the same time, though, we have a long way to go, and the considerable pollution of the city even in a “successful” year like 2008 should not be underestimated.

(1)Here, I’m not referring to data biasing. Rather, I’m simply considering the fact that Blue Sky Days are binary, as opposed to being a concentration value or gradual scale. Consider this extreme situation: if every day in one year had an API of 100, though the number of Blue Sky Days would be 365, the average annual PM10 concentration (indicating air quality) would actually be worse than it was in 2007 or 2008 in Beijing.

(2) This assumption is slightly problematic because for APIs below 50 the primary pollutant is not listed, although for APIs above 50 the primary pollutant is almost always PM10. To estimate the accuracy of this method, I used it on the 2006 and 2007 daily API databases and calculated an annual average PM10 concentration result for each year that deviated from the Beijing EPB’s reported values by well under 1%. Therefore, I think the assumption is pretty reasonable.