Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
181f4c3
1
Parent(s):
2ade62d
cache dfs parsing
Browse files- src/utils.py +3 -1
src/utils.py
CHANGED
@@ -4,12 +4,14 @@ import folium
|
|
4 |
import pandas as pd
|
5 |
from folium import plugins
|
6 |
from src.map_utils import legend_macro
|
7 |
-
|
8 |
|
9 |
EPICENTER_LOCATION = [31.12210171476489, -8.42945837915193]
|
10 |
BORDER_COLOR = "black"
|
11 |
|
|
|
12 |
def parse_gg_sheet(url):
|
|
|
13 |
url = url.replace("edit#gid=", "export?format=csv&gid=")
|
14 |
df = pd.read_csv(url, on_bad_lines="warn")
|
15 |
return df
|
|
|
4 |
import pandas as pd
|
5 |
from folium import plugins
|
6 |
from src.map_utils import legend_macro
|
7 |
+
import streamlit as st
|
8 |
|
9 |
EPICENTER_LOCATION = [31.12210171476489, -8.42945837915193]
|
10 |
BORDER_COLOR = "black"
|
11 |
|
12 |
+
@st.cache_data
|
13 |
def parse_gg_sheet(url):
|
14 |
+
print("Parsing Google Sheet:", url)
|
15 |
url = url.replace("edit#gid=", "export?format=csv&gid=")
|
16 |
df = pd.read_csv(url, on_bad_lines="warn")
|
17 |
return df
|