# Indice pollution
This package give you access to air pollution level in France.
You can instantiate a small website with a search bar, to search the air pollution level for a specific city, or you can use it as a lib.
## Website
Make a new virtual environment, and install the package with
```
pip install indice_pollution
```
And then run flask
```
flask run
```
Access it at `http://localhost:5000`
## As a lib
Make a new virtual environment, and install the package with
```
pip install indice_pollution
```
And then you can use it with
```
from indice_pollution import forecast
forecast(75101)
```
## Usage
### Forecast
#### Request
`GET` `/forecast?insee=${insee}`
#### Response
```json
{
"data": [
{
"date":"2020-08-10",
"date_ech":1597017600000,
"indice":7,
"qualif":"M\u00e9diocre",
"val_no2":0,
"val_o3":0,
"val_pm10":0,
"val_pm25":0,
"val_so2":0,
"valeur":7
}
],
"metadata": {
"region": {
"website": "http://www.atmonormandie.fr/",
"nom": "Normandie",
}
}
}
```
##### data
The array may contains several objects. Typically, one for the current day and potentially one forecast object for one or a couple of next days.
- `date` is the date for the forecast provided in `YYYY-MM-DD` format
- `indice` is the general "indice ATMO" as standardized by l'État Français (`1` is good air quality, `10` is terrible air quality)
- (optional) `date_ech` is ?
- (optional) `val_<pollutant>` are each the "indice AMTO" for each pollutant as standardized by l'État Français (`0` is a mistake value)
- (optional) `qualif` is a word qualifying the general "indice ATMO" as standardized by l'État Français. One of `Très bon`, `Bon`, `Moyen`, `Médiocre`, `Mauvais`,
- (optional) `valeur`. Same thing than `indice`
##### metadata
Currently, it only has a `region` property. This property is an object with:
- `nom` France Région name
- `website` corresponding AASQUA website
## Test
A test instanced is deployed at https://app-ed2e0e03-0bd3-4eb4-8326-000288aeb6a0.cleverapps.io/
Query example: https://app-ed2e0e03-0bd3-4eb4-8326-000288aeb6a0.cleverapps.io/forecast?insee=76717
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共56个文件
py:48个
txt:4个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:indice_pollution-0.17.4.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
indice_pollution-0.17.4.tar.gz (56个子文件)
indice_pollution-0.17.4
PKG-INFO 541B
indice_pollution.egg-info
PKG-INFO 541B
requires.txt 215B
SOURCES.txt 2KB
top_level.txt 17B
dependency_links.txt 1B
indice_pollution
models
__init__.py 110B
extensions.py 52B
autocomplete.py 422B
web.py 235B
history
models
potentiel_radon.py 528B
epci.py 1KB
departement.py 1KB
episode_pollution.py 3KB
episode.py 4KB
indice.py 1KB
__init__.py 398B
commune.py 3KB
zone.py 400B
indice_atmo.py 5KB
region.py 848B
commands.py 443B
__init__.py 22B
celery_worker.py 417B
default_settings.py 47B
helpers.py 136B
__init__.py 10KB
regions
La Réunion.py 122B
Centre-Val de Loire.py 3KB
occitanie_epcis.py 15KB
Auvergne-Rhône-Alpes.py 2KB
Corse.py 935B
Pays de la Loire.py 2KB
pays_de_la_loire_epcis.py 28KB
Sud.py 3KB
Réunion.py 118B
Provence-Alpes-Côte d'Azur.py 49B
Martinique.py 590B
Grand Est.py 945B
Occitanie.py 2KB
Île-de-France.py 4KB
Guadeloupe.py 766B
__init__.py 16KB
Hauts-de-France.py 729B
solvers.py 823B
Mayotte.py 119B
Nouvelle-Aquitaine.py 4KB
Bretagne.py 8KB
Guyane.py 119B
Normandie.py 4KB
Bourgogne-Franche-Comté.py 2KB
send_in_blue.py 848B
api.py 1KB
setup.cfg 79B
setup.py 1KB
README.md 2KB
共 56 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功