1
0
Fork 0

feat: Figures are now automatically generated

This commit is contained in:
Benedikt Bastin 2021-02-17 12:11:49 +01:00
parent a3bf0654f9
commit 8a3c5159b5
2 changed files with 52 additions and 112 deletions

View File

@ -173,124 +173,21 @@
</section>
<section>
<h1>Plots</h1>
{% for fig in figures %}
<figure>
<a href="extrapolated_to_10_percent.png">
<a href="{{ fig['filename'] }}.png">
<img
src="extrapolated_to_10_percent.png"
alt="" />
src="{{ fig['filename'] }}.png"
alt="{{ fig['caption'] }}" />
</a>
<figcaption>
<a name="figure-001"><span class="ref">Abbildung 1:</span></a>
Tägliche Impfquote, kumulierte Impfungen und lineare Extrapolation bis 10 % der Bevölkerung Deutschlands<br />
<a href="extrapolated_to_10_percent.png" download="extrapolated_to_10_percent.png">Download als PNG</a>
<a href="extrapolated_to_10_percent.pdf" download="extrapolated_to_10_percent.pdf">Download als PDF</a>
</figcaption>
</figure>
<figure>
<a href="extrapolated_to_70_percent.png">
<img
src="extrapolated_to_70_percent.png"
alt="" />
</a>
<figcaption>
<a name="figure-002"><span class="ref">Abbildung 2:</span></a>
Tägliche Impfquote, kumulierte Impfungen und lineare Extrapolation bis 70 % der Bevölkerung Deutschlands<br />
<a href="extrapolated_to_70_percent.png" download="extrapolated_to_70_percent.png">Download als PNG</a>
<a href="extrapolated_to_70_percent.pdf" download="extrapolated_to_70_percent.pdf">Download als PDF</a>
</figcaption>
</figure>
<figure>
<a href="extrapolated_to_100_percent.png">
<img
src="extrapolated_to_100_percent.png"
alt="" />
</a>
<figcaption>
<a name="figure-003"><span class="ref">Abbildung 3:</span></a>
Tägliche Impfquote, kumulierte Impfungen und lineare Extrapolation bis 100 % der Bevölkerung Deutschlands<br />
<a href="extrapolated_to_100_percent.png" download="extrapolated_to_100_percent.png">Download als PNG</a>
<a href="extrapolated_to_100_percent.pdf" download="extrapolated_to_100_percent.pdf">Download als PDF</a>
</figcaption>
</figure>
<figure>
<a href="vaccination_bar_graph_total_time.png">
<img
src="vaccination_bar_graph_total_time.png"
alt="" />
</a>
<figcaption>
<a name="figure-004"><span class="ref">Abbildung 4:</span></a>
Tägliche Impfrate (Erst- und Zweitimpfung übereinander)<br />
<a href="vaccination_bar_graph_total_time.png" download="vaccination_bar_graph_total_time.png">Download als PNG</a>
<a href="vaccination_bar_graph_total_time.pdf" download="vaccination_bar_graph_total_time.pdf">Download als PDF</a>
</figcaption>
</figure>
<figure>
<a href="vaccination_bar_graph_total_time_two_bars.png">
<img
src="vaccination_bar_graph_total_time_two_bars.png"
alt="" />
</a>
<figcaption>
<a name="figure-005"><span class="ref">Abbildung 5:</span></a>
Tägliche Impfrate (Erst- und Zweitimpfung nebeneinander)<br />
<a href="vaccination_bar_graph_total_time_two_bars.png" download="vaccination_bar_graph_total_time_two_bars.png">Download als PNG</a>
<a href="vaccination_bar_graph_total_time_two_bars.pdf" download="vaccination_bar_graph_total_time_two_bars.pdf">Download als PDF</a>
</figcaption>
</figure>
<figure>
<a href="vaccination_bar_graph_compare_both_vaccinations.png">
<img
src="vaccination_bar_graph_compare_both_vaccinations.png"
alt="" />
</a>
<figcaption>
<a name="figure-006"><span class="ref">Abbildung 6:</span></a>
Tägliche Impfrate (Erst- und Zweitimpfung nebeneinander)<br />
<a href="vaccination_bar_graph_compare_both_vaccinations.png" download="vaccination_bar_graph_compare_both_vaccinations.png">Download als PNG</a>
<a href="vaccination_bar_graph_compare_both_vaccinations.pdf" download="vaccination_bar_graph_compare_both_vaccinations.pdf">Download als PDF</a>
</figcaption>
</figure>
<figure>
<a href="cumulative_two_vaccinations.png">
<img
src="cumulative_two_vaccinations.png"
alt="" />
</a>
<figcaption>
<a name="figure-007"><span class="ref">Abbildung 7:</span></a>
Kumulative Impfrate (Erst- und Zweitimpfung)<br />
<a href="cumulative_two_vaccinations.png" download="cumulative_two_vaccinations.png">Download als PNG</a>
<a href="cumulative_two_vaccinations.pdf" download="cumulative_two_vaccinations.pdf">Download als PDF</a>
</figcaption>
</figure>
<figure>
<a href="cumulative_two_vaccinations_percentage.png">
<img
src="cumulative_two_vaccinations_percentage.png"
alt="" />
</a>
<figcaption>
<a name="figure-008"><span class="ref">Abbildung 8:</span></a>
Kumulative Impfrate (Erst- und Zweitimpfung) in Prozent der Bevölkerung Deutschlands<sup><a href="#footnote-002">2</a></sup><br />
<a href="cumulative_two_vaccinations_percentage.png" download="cumulative_two_vaccinations_percentage.png">Download als PNG</a>
<a href="cumulative_two_vaccinations_percentage.pdf" download="cumulative_two_vaccinations_percentage.pdf">Download als PDF</a>
</figcaption>
</figure>
<figure>
<a href="people_between_first_and_second.png">
<img
src="people_between_first_and_second.png"
alt="" />
</a>
<figcaption>
<a name="figure-009"><span class="ref">Abbildung 9:</span></a>
Anzahl der Personen zwischen Erst- und Zweitimpfung, also Personen, die die erste Impfung erhalten haben, die zweite aber noch nicht<br />
<a href="people_between_first_and_second.png" download="people_between_first_and_second.png">Download als PNG</a>
<a href="people_between_first_and_second.pdf" download="people_between_first_and_second.pdf">Download als PDF</a>
<a name="figure-{{ '{:03d}'.format(fig['index']) }}"><span class="ref">Abbildung {{ fig['index'] }}:</span></a>
{{ fig['caption'] }}<br />
<a href="{{ fig['filename'] }}.png" download="{{ fig['filename'] }}.png">Download als PNG</a>
<a href="{{ fig['filename'] }}.pdf" download="{{ fig['filename'] }}.pdf">Download als PDF</a>
</figcaption>
</figure>
{% endfor %}
</section>
<section>

43
plot.py
View File

@ -717,6 +717,49 @@ def render_dashboard():
data_second_vaccination = data_second_vaccination,
#details_per_land = dict(sorted(details_per_land_formatted.items(), key=lambda item: item[0])),
#details_total = details_total_formatted
figures = [
{
'index': 1,
'filename': 'extrapolated_to_10_percent',
'caption': 'Tägliche Impfquote, kumulierte Impfungen und lineare Extrapolation bis 10 % der Bevölkerung Deutschlands'
},{
'index': 2,
'filename': 'extrapolated_to_70_percent',
'caption': 'Tägliche Impfquote, kumulierte Impfungen und lineare Extrapolation bis 70 % der Bevölkerung Deutschlands'
},{
'index': 3,
'filename': 'extrapolated_to_100_percent',
'caption': 'Tägliche Impfquote, kumulierte Impfungen und lineare Extrapolation bis 100 % der Bevölkerung Deutschlands'
},{
'index': 4,
'filename': 'vaccination_bar_graph_total_time',
'caption': 'Tägliche Impfrate (Erst- und Zweitimpfung übereinander)'
},{
'index': 5,
'filename': 'vaccination_bar_graph_total_time_two_bars',
'caption': 'Tägliche Impfrate (Erst- und Zweitimpfung nebeneinander)'
},{
'index': 6,
'filename': 'vaccination_bar_graph_compare_both_vaccinations',
'caption': 'Tägliche Impfrate (Erst- und Zweitimpfung nebeneinander)'
},{
'index': 7,
'filename': 'cumulative_two_vaccinations',
'caption': 'Kumulative Impfrate (Erst- und Zweitimpfung)'
},{
'index': 8,
'filename': 'cumulative_two_vaccinations_percentage',
'caption': 'Kumulative Impfrate (Erst- und Zweitimpfung) in Prozent der Bevölkerung Deutschlands'
},{
'index': 9,
'filename': 'people_between_first_and_second',
'caption': 'Anzahl der Personen zwischen Erst- und Zweitimpfung, also Personen, die die erste Impfung erhalten haben, die zweite aber noch nicht'
},{
'index': 10,
'filename': 'vaccination_rate',
'caption': 'Tägliche Impfrate sowie durchschnittliche Impfrate'
}
]
).dump('site/index.xhtml')
shutil.copyfile(dashboard_filename, dashboard_archive_filename)