From a5e88f9c7767d88c4a756dbd5865844fc246899b Mon Sep 17 00:00:00 2001 From: cdkl Date: Wed, 13 Mar 2024 19:32:40 -0400 Subject: [PATCH] Read lat/lon from config --- scripts/plotly_streamlit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/plotly_streamlit.py b/scripts/plotly_streamlit.py index 6153d4e..c12af96 100755 --- a/scripts/plotly_streamlit.py +++ b/scripts/plotly_streamlit.py @@ -12,6 +12,7 @@ from sqlite3 import Connection import plotly.express as px from sklearn.preprocessing import normalize from suntime import Sun +from utils.helpers import get_settings profile = False if profile: @@ -181,8 +182,9 @@ font_size = 15 def sunrise_sunset_scatter(date_range): - latitude = df2['Lat'][0] - longitude = df2['Lon'][0] + conf = get_settings() + latitude = conf.getfloat('LATITUDE') + longitude = conf.getfloat('LONGITUDE') sun = Sun(latitude, longitude)