diff --git a/dashboard_template.xhtml b/dashboard_template.xhtml
index efaaf2e..ac65787 100644
--- a/dashboard_template.xhtml
+++ b/dashboard_template.xhtml
@@ -261,6 +261,19 @@
Download als PDF
+
diff --git a/plot.py b/plot.py
index 98526fc..b33cfb4 100644
--- a/plot.py
+++ b/plot.py
@@ -556,6 +556,57 @@ def plot_cumulative_two_vaccinations_percentage():
plot_cumulative_two_vaccinations_percentage()
+
+def plot_people_between_first_and_second():
+ archive_plot_filename = '{}/people_between_first_and_second'.format(archive_folder)
+ latest_plot_filename = '{}/people_between_first_and_second'.format(site_folder)
+
+ if os.path.isfile(archive_plot_filename + '.pdf'):
+ print('Plot {} already exists'.format(archive_plot_filename))
+ return
+
+ fig, ax = plt.subplots(1)
+
+
+ plt.title(
+ 'Personen zwischen Erst- und Zweitimpfung\n'
+ 'Datenquelle: RKI, Stand: {}. Erstellung: {}, Ersteller: Benedikt Bastin, Lizenz: CC BY-SA 4.0\n'.format(
+ print_stand, print_today
+ )
+ )
+
+ ax.grid()
+
+ first_vaccinations_cumulative = data_first_vaccination['cumulative']
+ second_vaccinations_cumulative = data_second_vaccination['cumulative']
+
+ people_between = first_vaccinations_cumulative - second_vaccinations_cumulative
+
+ ax.plot(dates, people_between, label='Personen zwischen Erst- und Zweitimpfung', color='darkblue')
+
+ ax.bar(dates, data_first_vaccination['daily'], color='blue', label='Erstimpfungen')
+ ax.bar(dates, -data_second_vaccination['daily'], color='lightblue', label='Zweitimpfungen')
+
+ ax.legend(loc='upper left')
+ ax.xaxis_date()
+ ax.get_yaxis().get_major_formatter().set_scientific(False)
+
+ ax.set_xlabel('Datum')
+ ax.set_ylabel('Personen zwischen Erst- und Zweitimpfung')
+
+
+ plt.savefig(archive_plot_filename + '.pdf')
+ plt.savefig(archive_plot_filename + '.png')
+ plt.savefig(latest_plot_filename + '.pdf')
+ plt.savefig(latest_plot_filename + '.png')
+ plt.close()
+
+ print('Created plot {} as pdf and png'.format(archive_plot_filename))
+
+
+plot_people_between_first_and_second()
+
+
def render_dashboard():
dashboard_filename = 'site/index.xhtml'
dashboard_archive_filename = 'site/archive/{}/index.xhtml'.format(filename_stand)