update enum for new data entries + fix requirements + fix drees name
This commit is contained in:
parent
7d5b692fae
commit
160215950c
12
README.md
12
README.md
@ -7,14 +7,15 @@ Data are provided by :
|
||||
* https://data.drees.solidarites-sante.gouv.fr/api/records/1.0/search/?dataset=covid-19-resultats-par-age-issus-des-appariements-entre-si-vic-si-dep-et-vac-si&q=&rows=-1&facet=date&facet=vac_statut&facet=age
|
||||
|
||||
## Requirements
|
||||
* Python 3.8.10
|
||||
|
||||
* Python >=3.8.10
|
||||
|
||||
## Installation
|
||||
version: your ubuntu version (20.04 or 22.04)
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements/requirements_<version>.txt
|
||||
```
|
||||
**NOTE**: adjust the requirements if linux distro does not match
|
||||
|
||||
## Launch
|
||||
|
||||
@ -24,9 +25,8 @@ python owid.py <country_trigram> <var_1> <var_2> <var..n>
|
||||
# Ex : python owid.py FRA new_cases_smoothed new_deaths_smoothed people_fully_vaccinated hosp_patients
|
||||
|
||||
# drees dataset
|
||||
python dress.py
|
||||
python drees.py
|
||||
```
|
||||
|
||||
**NOTE** :
|
||||
* `-r` option is used to fetch update data
|
||||
* `dress.py` includes **--to-html** to generate html page with plots
|
||||
* `drees.py` includes **--to-html** to generate html page with plots
|
||||
|
||||
13
drees.py
13
drees.py
@ -74,11 +74,14 @@ class VacStatus(DreesEnum):
|
||||
PDR = (1, "Primo dose récente")
|
||||
PDE = (2, "Primo dose efficace")
|
||||
CM3MSR = (3, "Complet de moins de 3 mois - sans rappel")
|
||||
CM3MAR = (4, "Complet - avec rappel de moins de 3 mois")
|
||||
CM3MAR = (4, "Complet - avec 1 rappel de moins de 3 mois")
|
||||
CM36MSR = (5, "Complet entre 3 mois et 6 mois - sans rappel")
|
||||
CM36MAR = (6, "Complet - avec rappel entre 3 mois et 6 mois")
|
||||
C6MAR = (7, "Complet - avec rappel de 6 mois ou plus")
|
||||
CM36MAR = (6, "Complet - avec 1 rappel entre 3 mois et 6 mois")
|
||||
C6MAR = (7, "Complet - avec 1 rappel de 6 mois ou plus")
|
||||
C6MSR = (8, "Complet de 6 mois ou plus - sans rappel")
|
||||
CM3MAR2 = (9, "Complet - avec 2 rappel de moins de 3 mois")
|
||||
CM36MAR2 = (10, "Complet - avec 2 rappel entre 3 mois et 6 mois")
|
||||
C6MAR2 = (11, "Complet - avec 2 rappel de 6 mois ou plus")
|
||||
|
||||
|
||||
class AgeGroup(DreesEnum):
|
||||
@ -622,7 +625,7 @@ def generate_html_page(
|
||||
|
||||
if __name__ == "__main__":
|
||||
"""
|
||||
This script aims to analyse and plot DRESS data
|
||||
This script aims to analyse and plot DREES data
|
||||
Stats availables:
|
||||
- Age distribution (percent) by field (vaccine and unvaccine)
|
||||
- Vaccine/unvaccine distribution (percent) by field and age
|
||||
@ -664,7 +667,7 @@ if __name__ == "__main__":
|
||||
args = parser.parse_args()
|
||||
|
||||
dic_data_unstructured: Dict[str, Any] = get_data(
|
||||
file_path=os.path.join(DATA_REPOSITORY, "dress.json"), refresh=args.refresh
|
||||
file_path=os.path.join(DATA_REPOSITORY, "drees.json"), refresh=args.refresh
|
||||
)
|
||||
dic_data: Dict[dt, Any] = structure_data(dic_data_unstructured)
|
||||
np_data, np_date = get_np_data(dic_data)
|
||||
|
||||
28
requirements/requirements_22-04.txt
Normal file
28
requirements/requirements_22-04.txt
Normal file
@ -0,0 +1,28 @@
|
||||
appdirs==1.4.4
|
||||
black==21.5b1
|
||||
certifi==2020.12.5
|
||||
chardet==4.0.0
|
||||
click==8.0.1
|
||||
cycler==0.10.0
|
||||
idna==2.10
|
||||
isort==5.10.1
|
||||
Jinja2==3.0.3
|
||||
kiwisolver==1.3.1
|
||||
MarkupSafe==2.1.1
|
||||
matplotlib==3.4.2
|
||||
mypy==0.920
|
||||
mypy-extensions==0.4.3
|
||||
numpy==1.23.4
|
||||
pathspec==0.8.1
|
||||
Pillow==9.2.0
|
||||
pyparsing==2.4.7
|
||||
python-dateutil==2.8.1
|
||||
pytz==2021.3
|
||||
regex==2021.4.4
|
||||
requests==2.25.1
|
||||
six==1.16.0
|
||||
toml==0.10.2
|
||||
tomli==2.0.0
|
||||
types-requests==2.26.2
|
||||
typing_extensions==4.0.1
|
||||
urllib3==1.26.4
|
||||
@ -10,7 +10,7 @@
|
||||
<body>
|
||||
<div class="main-container">
|
||||
<h1>Covid-19 DREES dataset</h1>
|
||||
<div>source : <a href="{{ src }}">Data DRESS</a></div>
|
||||
<div>source : <a href="{{ src }}">Data DREES</a></div>
|
||||
<div>période temporelle : <b>{{ period }}</b></div>
|
||||
<div>pas de temps : <b>journalier</b></div>
|
||||
<div>contact: <b>admin@thegux.fr</b></div>
|
||||
@ -102,4 +102,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user