put analyse data in namedtuple list + add global data in html template + fix css

This commit is contained in:
2021-12-29 22:26:03 +01:00
parent 37712f892d
commit 3952c6cab2
3 changed files with 119 additions and 11 deletions
+57 -5
View File
@@ -1,24 +1,76 @@
<!DOCTYPE html>
<html>
<head>
<title>Thegux covid-19</title>
<title>Covid-19 DREES dataset</title>
<meta charset="UTF-8">
<meta name="keywords" content="thegux, covid">
<link rel="stylesheet" href="{{ static }}/css/index.css">
<meta name="description" content="A simple page to share some useful data about covid 19">
<meta name="description" content="A simple page to share some useful data about DREES covid 19 dataset">
</head>
<body>
<div class="main-container">
<h1>Thegux covid-19</h1>
<h1>Covid-19 DREES dataset</h1>
<div>source : <a href="{{ src }}">Data DRESS</a></div>
<div>période temporelle : <b>{{ period }}</b></div>
<div>pas de temps : <b>journalier</b></div>
<h3>Hospitalisations/Soins critiques/Décés par status vaccinal groupés et tranches d'âges</h3>
<div>contact: <b>admin@thegux.fr</b></div>
<hr/>
<h3>Données globales</h3>
<h5>Répartition des tranches d'âges par catégorie (moyennée sur la période temporelle)</h5>
<div class="table-container">
{% for field in fields %}
<div class="table-item">
<table>
<tr>
<th colspan="2">{{ field.label }}</th>
</tr>
<tr>
<th>Age</th>
<th>%</th>
</tr>
{% for mean in age_mean %}
{% if field.label == mean.field %}
<tr>
<td>{{ mean.age }}</td>
<td>{{ mean.percent }}</td>
</tr>
{% endif %}
{% endfor %}
</table>
</div>
{% endfor %}
</div>
<h5>Pourcentage de vaccinés par catégorie (moyenné sur la période temporelle)</h5>
<div class="table-container">
{% for field in fields %}
<div class="table-item">
<table>
<tr>
<th colspan="2">{{ field.label }}</th>
</tr>
<tr>
<th>Age</th>
<th>%</th>
</tr>
{% for mean in vaccine_mean %}
{% if field.label == mean.field %}
<tr>
<td>{{ mean.age }}</td>
<td>{{ mean.percent }}</td>
</tr>
{% endif %}
{% endfor %}
</table>
</div>
{% endfor %}
</div>
<hr/>
<h3>Hospitalisations/Soins critiques/Décés par status vaccinal et tranches d'âges groupées</h3>
{% for field in fields %}
<img src="{{ static }}/plots/age_percent_vac_{{ field.name.lower() }}.png"/>
<img src="{{ static }}/plots/age_percent_unvac_{{ field.name.lower() }}.png"/>
{% endfor %}
<h3>Hospitalisations/Soins critiques/Décés par tranches d'âges groupés et status vaccinal</h3>
<h3>Hospitalisations/Soins critiques/Décés par tranches d'âges et status vaccinal groupé</h3>
{% for age in ages %}
{% for field in fields %}
<img src="{{ static }}/plots/vac_percent_{{ age.name.lower() }}_{{ field.name.lower() }}.png"/>