Guide to publishing Air Quality data on the World Air Quality Index project

Share: aqicn.org/publishingdata/hk/

Publishing data on the World Air Quality Index project is free for every one. But it is also simple and straightforward: All you need to add data on the World Air Quality Index map is to provide a feed URL with the real-time information about the monitoring stations (name and location), the pollutants being measured and the real-time readings (together with the units, for instance milligrams or ppb).


Qualification Criteria

Note that the data published on the World Air Quality Index map is only official data provided by each country respective Environmental Protection Agency (see the full EPA list). Those official data are monitored using professional BAM and TEOM-like Air Quality monitoring stations.

Those stations are not trivial, and do require constant maintenance and calibration by the EPA professional field-engineering teams. Therefore, except from specific conditions (e.g. if there no coverage in a country or a given region / city), the World Air Quality Index project does not accept any form of data generated from non-professional Air Quality monitors.

If your country or city does not have official monitoring, it is acceptable to report data from more affordable instant air particle counters (eg PMS, SDS,..). While we do recommend to use the semi-professional GAIA air quality monitoring stations for this purpose, we, however, accept data from other stations. Nevertheless, such particle counter-based stations need to report enhanced data feed with additional quality controls (see quality control section).

Feed format

Since almost every country has its own reporting format, the World Air Quality Index project can accept any kinds of formats for the feeds: They can be in CSV, JSON or just plain text or HTML format. You can find at the bottom of this page 3 example for CSV, HTML and JSON.

For reference, check the official feeds for Singapore, Peru or Netherlands and notice that despite they are all different, they can be ingested by our system.

For the instant air particle counters, you can either report the data via our own web server, or via the thingspeak.

Data ingestion

The World Air Quality Index system will take care of regularly checking the data from the feed, and each time an update is available, it will be processed, converted to the US EPA scale AQI values, and publish on the World Air Quality Index website within minutes.

Also, although only PM2.5, PM10, Ozone, NO2, SO2 and CO Air Quality data is published, the system does collect more pollutants for forecasting purpose: Benzen, Toluene, Ethylbenzene, NOx, THC, NMHC, PM1, Formaldehyde, Mercury, Ammonia, Methane, Hydrogen sulfide, Nitrous acid, Phenol, Naphthalene, paraxylene (p-Xylen), metaxylene (m-Xylen), etc..

It is also possible to publish meteorological data: Temperature, Atmospheric Pressure, Humidity, Precipitation, Wind Speed, Wind Direction, Solar Radiation and UVI. If not provided, we will use other relevant meteorologic information sources.

Feed Example (CSV format)

 #ID: ID_BEI_DC
#City: Beijing
#Station: Dongcheng
#Name: 东城东四
#Latitude: 39.929
#Longitude: 116.417
#Timezone: +0800
Date,PM10,PM25,CO,Ozone,Sulphur Dioxide,Nitrogen Dioxide,AmbientTemperature,RelativeHumidity,WindDirection,WindSpeed,Pressure,RainGauge
Unit,ug/m3,ug/m3,ppm,µg/m3,µg/m3,µg/m3,°C,%,°,m/s,hPa,mm
10/29/2016 13:00,16,3,,58,10,3,32,66,200,3,1001,0
10/29/2016 14:00,19,8,,57,9,4,32,64,197,2,1001,0
10/29/2016 15:00,15,9,,52,47,17,30,72,190,2,1001,0
10/29/2016 16:00,31,19,,52,34,17,30,75,191,2,1001,0
10/29/2016 17:00,31,17,,49,49,19,29,75,194,1,1002,0
10/29/2016 18:00,37,18,,45,55,25,29,73,183,1,1003,0
10/29/2016 19:00,24,13,,40,21,19,29,80,65,1,1004,0
10/29/2016 20:00,39,22,,44,4,16,28,85,7,1,1005,0
10/29/2016 21:00,24,16,,43,3,7,28,85,10,1,1005,0

Feed Example (HTML format)

This is an example based on an HTML format (direct url: publishingdata/html/):
Station list:
Station IDCity or County NameStation NameLocal name (optional)Latitude/LongitudeTimezone (optional)
ID_BEI_DCBeijingDongcheng东城东四39.929/116.417+0800
ID_BEI_WPBeijingWest Park西城官园39.929/116.339+0800
ID_BEI_OPBeijingOlympic Park朝阳奥体中心39.982/116.397+0800
..................
  • The "Station ID" is the unique identifer for each station, and it can just be a number (eg ID8373), or the concatenation of station city and station name (eg. "Beijing/Dongcheng").
  • By default, the station will be available via the url /city/country-name/city-name/station-name.
  • The "Station Name" must use latin characters, so the optional "Local Name" can be provided to localize the webpage.

Real-time pollutant list:
Station IDPollutantUnitUpdate timeValueAveraging
ID_BEI_DCPM10mg/m32020-07-07T09:00:00+09:0027.81 hour
ID_BEI_DCPM25mg/m32020-07-07T09:00:00+09:0010.81 hour
ID_BEI_DCOzonemg/m32020-07-07T09:00:00+09:0015.21 hour
ID_BEI_DCOzonemg/m32020-07-07T09:00:00+09:0018.28 hours
ID_BEI_DCTemperatureCelcius2020-07-07T09:00:00+09:0022.31 hour
ID_BEI_WPPM10mg/m32020-07-07T09:00:00+09:0027.81 hour
ID_BEI_WPPM25mg/m32020-07-07T09:00:00+09:0010.81 hour
ID_BEI_WPSO2ppb2020-07-07T09:00:00+09:0015.21 hour
ID_BEI_WPHumidiy%2020-07-07T09:00:00+09:00881 hour
...............
  • The "Averaging" column is use to specify the duration of the value. The most common averaging is 1 hour. It is also the prefered one, as our backend system will automatically do the 8 hour averagin computation for the Ozone and Carbon Monoxyde.
  • In the case the readings are provided more freqently than every hour (for instance every 30 minutes or 10 minutes), you can either provide the raw readings for the given period, or just the hourly averaging: Our back-end system will anyway process data even between the hour.

Feed Example (JSON format)

This is an example based on JSON format (direct url: /publishingdata/json/)
..

Quality Control for particule counter sensors

For instant particule counters, such as the Plantower PMS or Nova SDS, which provide instantaneous (in few seconds) particulate matter readings, the data is usually reported every minute. This data is usually computed based on several "averaged" readings from a one or two minute period.

The use of averaging is however not good enough, especially for failing sensors (or sensor close of end-of-life). Therefore, for such sensors, it is required to provide additonal metrics, such as the median, min, max, and standard-deviation. See for example the readings object in the below JSON data feed.
..
You can use the following arduino-compatible code to collect those metrics:
class Accumulator 
{ 
    #define OUTPUT_BUFFER_SIZE 120 
    char buffer[OUTPUT_BUFFER_SIZE]; 
 
    #define MAXACCVALUES 120 
    int vals[MAXACCVALUES]; 
 
    int count = 0; 
 
public: 
    Accumulator() 
    { 
        reset(); 
    } 
 
    void reset() 
    { 
        count = 0; 
        for (int i=0;i< MAXACCVALUES;i++)  
        { 
            vals[i]=0; 
        } 
    } 
 
    bool hasData()  
    { 
        return count!=0; 
    } 
 
    std::string output()  
    { 
        if (!hasData()) return std::string("{}"); 
 
        sprintf(buffer, OUTPUT_BUFFER_SIZE, "{\"min\":%d,\"max\":%d,\"median\":%d,\"average\":%.1f,\"stddev\":%.1f,\"count\":%d}",  
            vmin(), vmax(), median(), average(), stddev(), count); 
 
        return std::string(buffer); 
 
    } 
 
    void add(int val) 
    { 
        if (count==MAXACCVALUES-1) { 
          for (int i = 0; i < MAXACCVALUES - 1; i++) { 
            vals[i] = vals[i + 1]; 
            } 
            count --; 
        } 
        vals[count++]=val; 
    } 
 
    float stddev()  
    { 
        if (!hasData()) return -1; 
        int u  =avg(); 
        int t = 0; 
        for (int i=0;ivals[j]) { 
                    float t = vals[j]; 
                    vals[j]=vals[i]; 
                    vals[i]=t; 
                } 
  
            } 
        } 
        return vals[count/2]; 
    } 
 
    float avg()  
    { 
        if (!hasData()) return -1; 
        float t = 0; 
        for (int i=0;ivals[i]) { 
                t=vals[i]; 
            } 
        } 
        return t; 
    } 
 
    float vmax()  
    { 
        if (!hasData()) return -1; 
        float t = vals[0]; 
        for (int i=0;it) { 
                t=vals[i]; 
            } 
        } 
        return t; 
    } 
};

Inquiry Form



MetOne BAM 1020 station



Luft-Daten DIY station
Publishing data on the World Air Quality Index world map is simple. Both professional and DIY air quality monitoring stations are accepted:
  • Professional stations operated by EPAs are qualified by default, and are given dedicated pages (such as map/montenegro or city/paris) as well as historical data pages (eg historical/kosovo).

  • For the DIY stations (such as luft-daten), additional quality control is required before publishing on the map. This is to ensure high quality data accross the map (more explanation here).

There are two cases in order to upload your data into the map:
    Either you already have a website (or a feed such as thingspeak) from which we can collect the data from your stations. In this case our system will periodically load your page, extract the data and then republish it on our map. Check the feed examples for website examples.

    Either you do not have a website, but you have a station, and you would like to "push" the data directly to our system. In this case, you will need to write a small programm to "post" your station data via our upload API. Code sample is available from the upload API page.

If you fall in the first category (have a website), or if you have any doubts, send us a message using the form below. If you fall in the second category, and want to programatically post the data via our upload API, check our data upload scripts and API page.

Contact Form

Data Feed - Inquiry form
Enter your name - eg "John Doe"
Enter your email address - eg "john.doe@mail.com"
Enter your country or city - eg Tbilisi, Georgia
Enter your data-feed URL - eg "https://airnow.gov/"
Write few words about your request - eg: "A feed for Tbilisi, Georgia is available at ..", "The feed for Sofia, Bulgaria has been updated", "I need help to setup the feed for Dakar, Senegal", "The location of the station Patumahoe in Auckland is incorrect. It's lat,lon is -37.204,174.864", ..


想要自己的空氣質量監測站嗎?

GAIA空氣質量監測站正在使用高科技激光粒子傳感器來實時測量PM2.5污染,這是最有害的空氣污染物之一。

它們非常易於設置,只需要一個WIFI接入點和一個USB電源。 連接後,我們的地圖上即時和實時報告空氣污染水平

關於空氣質量與空氣污染指數

本網站採用的污染指數和顏色與EPA是完全相同的。 EPA的指數可以從 AirNow上查到

空气质量指数 空气质量指数级别(状况)及表示颜色 对健康影响情况 建议采取的措施
0 - 50 一级(优) 空气质量令人满意,基本无空气污染 各类人群可正常活动
51 -100 二级(良) 空气质量可接受,但某些污染物可能对极少数异常敏感人群健康有较弱影响 极少数异常敏感人群应减少户外活动
101-150 三级(轻度污染) 易感人群症状有轻度加剧,健康人群出现刺激症状 儿童、老年人及心脏病、呼吸系统疾病患者应减少长时间、高强度的户外锻炼
151-200 四级(中度污染) 进一步加剧易感人群症状,可能对健康人群心脏、呼吸系统有影响 儿童、老年人及心脏病、呼吸系统疾病患者避免长时间、高强度的户外锻炼,一般人群适量减少户外运动
201-300 五级(重度污染) 心脏病和肺病患者症状显著加剧,运动耐受力降低,健康人群普遍出现症状 儿童、老年人及心脏病、肺病患者应停留在室内,停止户外运动,一般人群减少户外运动
300+ 六级(严重污染) 健康人群运动耐受力降低,有明显强烈症状,提前出现某些疾病 儿童、老年人和病人应停留在室内,避免体力消耗,一般人群避免户外活动
(参考详见 http://zh.wikipedia.org/wiki/空气质量指数)

如果你想了解更多有關空氣質量與污染,詳見維基百科或者 AirNow

有關健康建議詳​​見北京的Richard Saint Cyr MD醫生的博客:www.myhealthbeijing.com


注意事項: 所有空氣品質數據在發佈時均未經驗證,且為了確保資料準確性,這些數據可能隨時被修改,恕不另行通知。 世界空氣品質指數專案在編制這些訊息內容時已經謹慎的運用了所有適當的技巧,在任何情況下世界空氣品質指數 在任何情況下,世界空氣品質指數專案團隊或其代理人均不對因提供此數據而直接或間接引起的任何損失、傷害或損害來承擔契約、侵權或其他責任。



設定


選擇語言:


Temperature unit:
Celcius