Skip to content

Commit

Permalink
Merge pull request #12 from ferbcn/devel
Browse files Browse the repository at this point in the history
Devel bug
  • Loading branch information
ferbcn authored Jun 12, 2024
2 parents b7301d7 + c58b0a5 commit 6798030
Show file tree
Hide file tree
Showing 2 changed files with 1,721 additions and 1,939 deletions.
7 changes: 1 addition & 6 deletions pages/dash_swiss_ev.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
else:
print("EV Stations file not found.")

print("Loading Live EV Stations data...")
if os.path.exists("static/live_ev_df.json"):
live_ev_df = pd.read_json("static/live_ev_df.json", lines=True)
else:
print("Live EV Stations file not found.")

DDOWN_OPTIONS = ["All", "Available", "Occupied", "OutOfService", "Unknown"]

Expand Down Expand Up @@ -124,7 +119,7 @@ def update_graph(selected_layer=None):
print("Loading live EV station data...")
if os.path.exists("static/live_ev_df.json") and time.time() < os.path.getctime("static/live_ev_df.json") + 60*1*1:
print("Using cached live EV data from file (not older than 1 min) ...")
live_df = pd.DataFrame(live_ev_df)
live_df = pd.read_json("static/live_ev_df.json", lines=True)
else:
print("Loading FRESH live EV data...")
live_df = get_live_ev_station_data()
Expand Down
Loading

0 comments on commit 6798030

Please sign in to comment.