From 75a7ec967cd25ef1fe9c429da0a0ee133cdf014b Mon Sep 17 00:00:00 2001 From: Sebastian Lenzlinger <74497638+sebaschi@users.noreply.github.com> Date: Sat, 6 Jan 2024 14:10:21 +0100 Subject: [PATCH] Add method stubs for creating time series charts. --- analysis/plots.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/analysis/plots.py b/analysis/plots.py index bda3854..a612973 100644 --- a/analysis/plots.py +++ b/analysis/plots.py @@ -10,7 +10,7 @@ import numpy as np logging.getLogger("matplotlib").setLevel(logging.WARNING) -# TODO +# Summary charts ====================================================================================================== def plt_acc_by_year(db): acc_year_sql = """ SELECT COUNT(*), accidentyear FROM accidents @@ -65,6 +65,25 @@ def plt_acc_by_daytime(db): fig.write_image("fig/acc_by_day.png") fig.write_html("html/acc_by_day.html") +# Time Series charts ================================================================================================== +def acc_by_type(): + pass + +def severity_by_year(): + pass + +def ped_by_month(): + pass + +def bike_by_month(): + pass + + +def severity_by_month(): + pass + + + # Utilities =========================================================================================================== def save_as_barplot(df, xname, yname, orientation, file_name):