diff --git a/plot.py b/plot.py index e027756..f294877 100644 --- a/plot.py +++ b/plot.py @@ -235,7 +235,7 @@ def labeled_timeperiod(ax, start, end, text, color='lightgrey', y_height = 100): def add_annotations(ax): labeled_timeperiod(ax, datetime.date(2021, 3, 15), datetime.date(2021, 3, 19), 'AZ-Stopp', 'silver') - labeled_timeperiod(ax, datetime.date(2021, 3, 29), datetime.date(2021, 4, 6), 'AZ-Stopp u. 60', 'lightgrey', 96) + labeled_timeperiod(ax, datetime.date(2021, 3, 29), today, 'AZ-Stopp u. 60', 'lightgrey', 96) labeled_timeperiod(ax, datetime.date(2021, 4, 6), today, 'Arztpraxen impfen', 'lightgreen') @@ -276,43 +276,6 @@ def plot_vaccination_bar_graph_total_time(): plot_vaccination_bar_graph_total_time() -def plot_vaccination_bar_graph_last_three_weeks(): - - plot_name = 'vaccination_bar_graph_last_three_weeks' - if not check_recreate_plot(plot_name): - return - - fig, ax = plt.subplots(1) - - - plt.title( - 'Tägliche Impfrate der letzten drei Wochen (Erst- und Zweitimpfung übereinander)\n' - 'Datenquelle: RKI, Stand: {}. Erstellung: {}, Ersteller: Benedikt Bastin, Lizenz: CC BY-SA 4.0\n'.format( - print_stand, print_today - ) - ) - - ax.grid() - - ax.bar(dates, data_first_vaccination['daily'], label='Tägliche Erstimpfungen', color='blue') - ax.bar(dates, data_second_vaccination['daily'], label='Tägliche Zweitimpfungen', color='lightblue', bottom=data_first_vaccination['daily']) - - ax.set_xlim([today - datetime.timedelta(22), today]) - - ax.legend(loc='upper left') - ax.get_yaxis().get_major_formatter().set_scientific(False) - - ax.set_xlabel('Datum') - ax.set_ylabel('Tägliche Impfungen') - - add_annotations(ax) - - save_plot(plot_name) - plt.close() - - -plot_vaccination_bar_graph_last_three_weeks() - def plot_vaccination_bar_graph_total_time_by_week(): plot_name = 'vaccination_bar_graph_total_time_by_week' @@ -838,46 +801,42 @@ def render_dashboard(): 'caption': 'Tägliche Impfrate (Erst- und Zweitimpfung übereinander)' },{ 'index': 2, - 'filename': 'vaccination_bar_graph_last_three_weeks', - 'caption': 'Tägliche Impfrate der letzten drei Wochen (Erst- und Zweitimpfung übereinander)' - },{ - 'index': 3, 'filename': 'vaccination_bar_graph_total_time_by_week', 'caption': 'Wöchentliche Impfrate (Erst- und Zweitimpfung übereinander)' },{ - 'index': 4, + 'index': 3, 'filename': 'vaccination_bar_graph_total_time_two_bars', 'caption': 'Tägliche Impfrate (Erst- und Zweitimpfung nebeneinander)' },{ - 'index': 5, + 'index': 4, 'filename': 'vaccination_bar_graph_compare_both_vaccinations', 'caption': 'Tägliche Impfrate (Erst- und Zweitimpfung nebeneinander)' },{ - 'index': 6, + 'index': 5, 'filename': 'cumulative_two_vaccinations', 'caption': 'Kumulative Impfrate (Erst- und Zweitimpfung)' },{ - 'index': 7, + 'index': 6, 'filename': 'cumulative_two_vaccinations_percentage', 'caption': 'Kumulative Impfrate (Erst- und Zweitimpfung) in Prozent der Bevölkerung Deutschlands' },{ - 'index': 8, + 'index': 7, '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': 9, + 'index': 8, 'filename': 'vaccination_rate', 'caption': 'Tägliche Impfrate sowie durchschnittliche Impfrate' },{ - 'index': 10, + 'index': 9, 'filename': 'vaccination_done_days', 'caption': 'Lineare Extrapolation bis 70 % der Bevölkerung anhand der Erstimpfungen der durchschnittlichen Impfrate (Anzahl Tage, Gesamt und 7 Tage)' },{ - 'index': 11, + 'index': 10, 'filename': 'vaccination_done_weeks', 'caption': 'Lineare Extrapolation bis 70 % der Bevölkerung anhand der Erstimpfungen der durchschnittlichen Impfrate (Anzahl Wochen, Gesamt und 7 Tage)' },{ - 'index': 12, + 'index': 11, 'filename': 'vaccination_done_dates', 'caption': 'Lineare Extrapolation bis 70 % der Bevölkerung anhand der Erstimpfungen der durchschnittlichen Impfrate (Datum, Gesamt und 7 Tage)' }