diff --git a/wsgi.py b/wsgi.py index ef76d15..a24c658 100644 --- a/wsgi.py +++ b/wsgi.py @@ -72,8 +72,7 @@ def create_plot_df( df.index = df.index.astype("datetime64[ns]") + pd.DateOffset(hours=10) df = df.reindex( - pd.date_range(start="2023-08-15", end=curr_datetime) - + pd.DateOffset(hours=10) + pd.date_range(start="2023-08-15", end=curr_datetime) + pd.DateOffset(hours=10) ) if current_df is not None: @@ -89,13 +88,14 @@ def create_plot_df( return df + def plot( current_df: pd.DataFrame | None = None, data_folder: str = "data", sheet_name: str = "digital", - total_targets: tuple[int, ...] = (1500, ), + total_targets: tuple[int, ...] = (1500,), alpha: float | None = None, - landesbez_str: str | None = None + landesbez_str: str | None = None, ) -> str: curr_datetime = datetime.datetime.now() df = create_plot_df( @@ -140,12 +140,21 @@ def plot( if current_df is not None: plt.annotate( "Jetzt", - (plot_df.dropna().index[-1], plot_df.dropna()["Digitale Befragung"][-1] * 1.03), + ( + plot_df.dropna().index[-1], + plot_df.dropna()["Digitale Befragung"][-1] * 1.03, + ), fontsize=8, ha="center", ) - plt.plot(plot_df.index, plot_df["Digitale Befragung"], lw=1.5, color="#e4004e", label=landesbez_str,) + plt.plot( + plot_df.index, + plot_df["Digitale Befragung"], + lw=1.5, + color="#e4004e", + label=landesbez_str, + ) plt.title("Teilnahme an Digitaler Beschäftigtenbefragung") plt.ylabel("# Teilnahmen")