AQI Data of Cities in China
I build a Github Repository ChinaAQIData
We collect real-time air quality data from China National Environmental Monitoring Centre. The data API is http://106.37.208.233:20035/emcpublish/ClientBin/Env-CnemcPublish-RiaServices-EnvCnemcPublishDomainService.svc/binary/GetAQIDataPublishLives
. This API provides a WCF binary data stream. We can use wget
to get the data, and use python-wcfbin
to decode this binary data to XML text format.
In this project, we use the shell data_from_cepm.sh
to do the whole process of data crawling and decoding. We set up a cron
job on linux system to execute this shell twice every hour. XML files are stored in the xml
directory and json files in the archives
directory. We also keep a airnow.json
file which contains the air quality data of current hour.
About the Units:
- For PM2.5, PM10, SO2,NO2, O3, the unit is μg/m^3.
- For CO, the unit is mg/m^3.
Base on this data, we built Air Now:Air Quality Map of China
When using the data by this method, give appropriate credit and cite the following paper:
Wei Lu, Tinghua Ai, Xiang Zhang and Yakun He. An Interactive Web Mapping Visualization of Urban Air Quality Monitoring Data of China[J]. Atmosphere, 2017, 8(8): 148.
Disclaimer
We are not responsible for the truth of the data collected by this method. Anyone who uses the data by this method should be responsible for any consequence caused by using the data.