# ChinaAQIData
## 中国城市AQI数据
我们从[中国环境总站](http://www.cnemc.cn/)采集实时的空气质量数据。数据API是`http://106.37.208.233:20035/emcpublish/ClientBin/Env-CnemcPublish-RiaServices-EnvCnemcPublishDomainService.svc/binary/GetAQIDataPublishLives`。这个API提供了一个WCF二进制数据流,使用`wget`命令可以下载一个二进制数据文件,然后使用[`python-wcfbin`](https://github.com/ernw/python-wcfbin) 对该二进制文件进行解码得到XML文本格式的数据。
这个项目,我们使用`data_from_cepm.sh`这个shell脚本完成整个数据获取和解码的工作。我们在Linux机器上设置了一个`cron`任务,每个小时定时执行两次该脚本,并将获得的XML文件存储到`xml`目录中,json文件存储到`archives`目录中。同时,我们也保存一个`airnow.json`的文件存储当前小时的空气质量数据。
关于数据的单位问题,通过核对官方网站可知:
* PM2.5, PM10, SO2, NO2, O3, 单位为 μg/m^3.
* CO单位是 mg/m^3.
基于此数据的[中国实时空气质量地图](http://mapviz.xyz:8080/)
如果使用本方法获取数据,请引用以下论文:
Wei Lu, Tinghua Ai, Xiang Zhang and Yakun He. [***An Interactive Web Mapping Visualization of Urban Air Quality Monitoring Data of China***](http://www.mdpi.com/2073-4433/8/8/148/htm)[J]. Atmosphere, 2017, 8(8): 148.
## 免责声明
我们不对使用此方法采集到的数据的真实性负责。使用此方法获取的数据出现的任何后果由使用方法者自己负责。
## AQI Data of Cities in China
We collect real-time air quality data from [China National Environmental Monitoring Centre](http://www.cnemc.cn/). 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`](https://github.com/ernw/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](http://mapviz.xyz:8080/)
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***](http://www.mdpi.com/2073-4433/8/8/148/htm)[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.
没有合适的资源?快使用搜索试试~ 我知道了~
Python-中国城市AQI数据AQIDataofCitiesinChina
共54个文件
py:20个
pyc:16个
rst:4个
需积分: 50 14 下载量 172 浏览量
2019-08-12
06:35:29
上传
评论
收藏 334KB ZIP 举报
温馨提示
中国城市AQI数据(AQI Data of Cities in China)
资源推荐
资源详情
资源评论
收起资源包目录
Python-中国城市AQI数据AQIDataofCitiesinChina.zip (54个子文件)
ChinaAQIData-master
.gitignore 80B
requirements.txt 7B
data_from_cepm.sh 321B
xml
.gitkeep 0B
airnow.json 1.28MB
README.md 3KB
python-wcfbin
setup.py 863B
GetAQIDataPublishLives 1.09MB
xml2wcf.py 579B
WcfPlugin.py 2KB
.travis.yml 101B
doc
Makefile 5KB
example.hex 5KB
source
api.rst 385B
examples.rst 133B
index.rst 474B
conf.py 8KB
listrecords.py 2KB
blogpost.rst 4KB
LICENSE.txt 1KB
README.md 541B
tests
__init__.py 87B
alltests.py 2KB
wcf
records
elements.py 9KB
__init__.py 4KB
base.py 9KB
__pycache__
base.cpython-32.pyc 11KB
elements.cpython-36.pyc 9KB
text.cpython-36.pyc 29KB
elements.cpython-32.pyc 13KB
text.cpython-32.pyc 41KB
base.cpython-36.pyc 8KB
__init__.cpython-32.pyc 3KB
attributes.cpython-36.pyc 14KB
__init__.cpython-36.pyc 2KB
attributes.cpython-32.pyc 20KB
text.py 23KB
attributes.py 13KB
__init__.py 2KB
xml2records.py 12KB
__pycache__
dictionary.cpython-32.pyc 21KB
__init__.cpython-32.pyc 213B
__init__.cpython-36.pyc 195B
datatypes.cpython-32.pyc 8KB
dictionary.cpython-36.pyc 17KB
datatypes.cpython-36.pyc 6KB
dictionary.py 19KB
MyHTMLParser.py 14KB
datatypes.py 7KB
wcf2xml.py 2KB
proxy.py 15KB
tox.ini 109B
archives
.gitkeep 0B
xml2json.py 2KB
共 54 条
- 1
资源评论
weixin_39841848
- 粉丝: 510
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功