move output into its own folder

This commit is contained in:
2024-09-26 11:25:51 +01:00
parent c3b6258e8a
commit ea22fd9a76

View File

@@ -14,6 +14,8 @@ date_format = "%Y-%m-%d"
yesterday = datetime.today() - timedelta(days=1)
yesterday = yesterday.strftime(date_format)
delay_csv = "delays.csv"
delay_html = "output/delays.html"
delay_png = "output/delays.png"
def get_delay(date_string: str) -> int:
@@ -73,8 +75,8 @@ def make_plot():
df["Date"] = pd.to_datetime(df["Date"])
fig = calplot(df, x="Date", y="Minutes Late", dark_theme=True, colorscale=[(0, "green"), (0.1, "yellow"), (1, "red")])
fig.write_image("delays.png")
plotly.offline.plot(fig, filename="delays.html")
fig.write_image(delay_png)
plotly.offline.plot(fig, filename=delay_html)
if __name__ == "__main__":