From 1d01612ef769c340c19b9da2cd215bdd64b5581d Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 29 Nov 2024 12:02:44 +0100 Subject: [PATCH] Lint --- scripts/utils/interactive_plot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/utils/interactive_plot.py b/scripts/utils/interactive_plot.py index 08b19313..36a07d8e 100644 --- a/scripts/utils/interactive_plot.py +++ b/scripts/utils/interactive_plot.py @@ -35,6 +35,7 @@ ALL_HOURS = list(range(24)) + def load_fonts(): conf = get_settings() # Define font families based on language settings @@ -45,6 +46,7 @@ def load_fonts(): else: return 'Roboto Flex' + def normalize_logarithmic(arr): """Applies a logarithmic normalization to the array, mapping values between 0.5 and max(arr) to a normalized scale between 0 and 1.""" arr = arr.astype(float) @@ -85,7 +87,7 @@ def create_plotly_heatmap(df_birds, now): """Creates a Plotly heatmap with annotations based on bird detection data.""" font_family = load_fonts() - + main_title = f"Hourly Overview Updated at {now.strftime('%Y-%m-%d %H:%M:%S')}" subtitle = f"({df_birds['Com_Name'].nunique()} species today; {len(df_birds)} detections today)"