diff --git a/README.md b/README.md index 2a8434b..7d60c1b 100644 --- a/README.md +++ b/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_.txt ``` +**NOTE**: adjust the requirements if linux distro does not match ## Launch @@ -24,9 +25,8 @@ python owid.py # 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 \ No newline at end of file +* `drees.py` includes **--to-html** to generate html page with plots diff --git a/drees.py b/drees.py index 7e1dfe4..f704025 100644 --- a/drees.py +++ b/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) diff --git a/requirements.txt b/requirements/requirements_20-04.txt similarity index 100% rename from requirements.txt rename to requirements/requirements_20-04.txt diff --git a/requirements/requirements_22-04.txt b/requirements/requirements_22-04.txt new file mode 100644 index 0000000..dce91b0 --- /dev/null +++ b/requirements/requirements_22-04.txt @@ -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 diff --git a/templates/index.template.html b/templates/index.template.html index 3a20abe..aaa2380 100644 --- a/templates/index.template.html +++ b/templates/index.template.html @@ -10,7 +10,7 @@

Covid-19 DREES dataset

-
source : Data DRESS
+
source : Data DREES
période temporelle : {{ period }}
pas de temps : journalier
contact: admin@thegux.fr
@@ -102,4 +102,4 @@
- \ No newline at end of file +