Changed back to streamlit 1.17
Browse files- apps/housing.py +2 -2
- apps/hurricane.py +1 -1
- apps/raster.py +2 -2
- apps/timelapse.py +1 -1
- apps/wms.py +1 -1
- pages/13_ποΈ_Global_Building_Footprints.py +1 -1
- pages/1_π·_Timelapse.py +2 -2
- pages/2_π _U.S._Housing.py +2 -2
- pages/7_π¦_Web_Map_Service.py +1 -1
- pages/8_ποΈ_Raster_Data_Visualization.py +2 -2
- requirements.txt +1 -1
apps/housing.py
CHANGED
@@ -80,7 +80,7 @@ def get_data_columns(df, category, frequency="monthly"):
|
|
80 |
return cols[1:]
|
81 |
|
82 |
|
83 |
-
@st.
|
84 |
def get_inventory_data(url):
|
85 |
df = pd.read_csv(url)
|
86 |
url = url.lower()
|
@@ -124,7 +124,7 @@ def get_periods(df):
|
|
124 |
return [str(d) for d in list(set(df["month_date_yyyymm"].tolist()))]
|
125 |
|
126 |
|
127 |
-
@st.
|
128 |
def get_geom_data(category):
|
129 |
|
130 |
prefix = (
|
|
|
80 |
return cols[1:]
|
81 |
|
82 |
|
83 |
+
@st.cache(allow_output_mutation=True)
|
84 |
def get_inventory_data(url):
|
85 |
df = pd.read_csv(url)
|
86 |
url = url.lower()
|
|
|
124 |
return [str(d) for d in list(set(df["month_date_yyyymm"].tolist()))]
|
125 |
|
126 |
|
127 |
+
@st.cache(allow_output_mutation=True)
|
128 |
def get_geom_data(category):
|
129 |
|
130 |
prefix = (
|
apps/hurricane.py
CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
|
|
2 |
import tropycal.tracks as tracks
|
3 |
|
4 |
|
5 |
-
@st.
|
6 |
def read_data(basin='north_atlantic', source='hurdat', include_btk=False):
|
7 |
return tracks.TrackDataset(basin=basin, source=source, include_btk=include_btk)
|
8 |
|
|
|
2 |
import tropycal.tracks as tracks
|
3 |
|
4 |
|
5 |
+
@st.cache(allow_output_mutation=True)
|
6 |
def read_data(basin='north_atlantic', source='hurdat', include_btk=False):
|
7 |
return tracks.TrackDataset(basin=basin, source=source, include_btk=include_btk)
|
8 |
|
apps/raster.py
CHANGED
@@ -4,7 +4,7 @@ import streamlit as st
|
|
4 |
import palettable
|
5 |
|
6 |
|
7 |
-
@st.
|
8 |
def load_cog_list():
|
9 |
print(os.getcwd())
|
10 |
in_txt = os.path.join(os.getcwd(), "data/cog_files.txt")
|
@@ -12,7 +12,7 @@ def load_cog_list():
|
|
12 |
return [line.strip() for line in f.readlines()[1:]]
|
13 |
|
14 |
|
15 |
-
@st.
|
16 |
def get_palettes():
|
17 |
palettes = dir(palettable.matplotlib)[:-16]
|
18 |
return ["matplotlib." + p for p in palettes]
|
|
|
4 |
import palettable
|
5 |
|
6 |
|
7 |
+
@st.cache(allow_output_mutation=True)
|
8 |
def load_cog_list():
|
9 |
print(os.getcwd())
|
10 |
in_txt = os.path.join(os.getcwd(), "data/cog_files.txt")
|
|
|
12 |
return [line.strip() for line in f.readlines()[1:]]
|
13 |
|
14 |
|
15 |
+
@st.cache(allow_output_mutation=True)
|
16 |
def get_palettes():
|
17 |
palettes = dir(palettable.matplotlib)[:-16]
|
18 |
return ["matplotlib." + p for p in palettes]
|
apps/timelapse.py
CHANGED
@@ -11,7 +11,7 @@ from datetime import date
|
|
11 |
from .rois import *
|
12 |
|
13 |
|
14 |
-
@st.
|
15 |
def uploaded_file_to_gdf(data):
|
16 |
import tempfile
|
17 |
import os
|
|
|
11 |
from .rois import *
|
12 |
|
13 |
|
14 |
+
@st.cache(allow_output_mutation=True)
|
15 |
def uploaded_file_to_gdf(data):
|
16 |
import tempfile
|
17 |
import os
|
apps/wms.py
CHANGED
@@ -3,7 +3,7 @@ import streamlit as st
|
|
3 |
import leafmap.foliumap as leafmap
|
4 |
|
5 |
|
6 |
-
@st.
|
7 |
def get_layers(url):
|
8 |
options = leafmap.get_wms_layers(url)
|
9 |
return options
|
|
|
3 |
import leafmap.foliumap as leafmap
|
4 |
|
5 |
|
6 |
+
@st.cache(allow_output_mutation=True)
|
7 |
def get_layers(url):
|
8 |
options = leafmap.get_wms_layers(url)
|
9 |
return options
|
pages/13_ποΈ_Global_Building_Footprints.py
CHANGED
@@ -31,7 +31,7 @@ st.title("Global Building Footprints")
|
|
31 |
col1, col2 = st.columns([8, 2])
|
32 |
|
33 |
|
34 |
-
@st.
|
35 |
def read_data(url):
|
36 |
return gpd.read_file(url)
|
37 |
|
|
|
31 |
col1, col2 = st.columns([8, 2])
|
32 |
|
33 |
|
34 |
+
@st.cache(allow_output_mutation=True)
|
35 |
def read_data(url):
|
36 |
return gpd.read_file(url)
|
37 |
|
pages/1_π·_Timelapse.py
CHANGED
@@ -15,7 +15,7 @@ st.set_page_config(layout="wide")
|
|
15 |
warnings.filterwarnings("ignore")
|
16 |
|
17 |
|
18 |
-
@st.
|
19 |
def ee_authenticate(token_name="EARTHENGINE_TOKEN"):
|
20 |
geemap.ee_initialize(token_name=token_name)
|
21 |
|
@@ -206,7 +206,7 @@ ocean_rois = {
|
|
206 |
}
|
207 |
|
208 |
|
209 |
-
@st.
|
210 |
def uploaded_file_to_gdf(data):
|
211 |
import tempfile
|
212 |
import os
|
|
|
15 |
warnings.filterwarnings("ignore")
|
16 |
|
17 |
|
18 |
+
@st.cache(allow_output_mutation=True)
|
19 |
def ee_authenticate(token_name="EARTHENGINE_TOKEN"):
|
20 |
geemap.ee_initialize(token_name=token_name)
|
21 |
|
|
|
206 |
}
|
207 |
|
208 |
|
209 |
+
@st.cache(allow_output_mutation=True)
|
210 |
def uploaded_file_to_gdf(data):
|
211 |
import tempfile
|
212 |
import os
|
pages/2_π _U.S._Housing.py
CHANGED
@@ -96,7 +96,7 @@ def get_data_columns(df, category, frequency="monthly"):
|
|
96 |
return cols[1:]
|
97 |
|
98 |
|
99 |
-
@st.
|
100 |
def get_inventory_data(url):
|
101 |
df = pd.read_csv(url)
|
102 |
url = url.lower()
|
@@ -140,7 +140,7 @@ def get_periods(df):
|
|
140 |
return [str(d) for d in list(set(df["month_date_yyyymm"].tolist()))]
|
141 |
|
142 |
|
143 |
-
@st.
|
144 |
def get_geom_data(category):
|
145 |
|
146 |
prefix = (
|
|
|
96 |
return cols[1:]
|
97 |
|
98 |
|
99 |
+
@st.cache(allow_output_mutation=True)
|
100 |
def get_inventory_data(url):
|
101 |
df = pd.read_csv(url)
|
102 |
url = url.lower()
|
|
|
140 |
return [str(d) for d in list(set(df["month_date_yyyymm"].tolist()))]
|
141 |
|
142 |
|
143 |
+
@st.cache(allow_output_mutation=True)
|
144 |
def get_geom_data(category):
|
145 |
|
146 |
prefix = (
|
pages/7_π¦_Web_Map_Service.py
CHANGED
@@ -20,7 +20,7 @@ st.sidebar.info(
|
|
20 |
)
|
21 |
|
22 |
|
23 |
-
@st.
|
24 |
def get_layers(url):
|
25 |
options = leafmap.get_wms_layers(url)
|
26 |
return options
|
|
|
20 |
)
|
21 |
|
22 |
|
23 |
+
@st.cache(allow_output_mutation=True)
|
24 |
def get_layers(url):
|
25 |
options = leafmap.get_wms_layers(url)
|
26 |
return options
|
pages/8_ποΈ_Raster_Data_Visualization.py
CHANGED
@@ -21,7 +21,7 @@ st.sidebar.info(
|
|
21 |
)
|
22 |
|
23 |
|
24 |
-
@st.
|
25 |
def load_cog_list():
|
26 |
print(os.getcwd())
|
27 |
in_txt = os.path.join(os.getcwd(), "data/cog_files.txt")
|
@@ -29,7 +29,7 @@ def load_cog_list():
|
|
29 |
return [line.strip() for line in f.readlines()[1:]]
|
30 |
|
31 |
|
32 |
-
@st.
|
33 |
def get_palettes():
|
34 |
return list(cm.palettes.keys())
|
35 |
# palettes = dir(palettable.matplotlib)[:-16]
|
|
|
21 |
)
|
22 |
|
23 |
|
24 |
+
@st.cache(allow_output_mutation=True)
|
25 |
def load_cog_list():
|
26 |
print(os.getcwd())
|
27 |
in_txt = os.path.join(os.getcwd(), "data/cog_files.txt")
|
|
|
29 |
return [line.strip() for line in f.readlines()[1:]]
|
30 |
|
31 |
|
32 |
+
@st.cache(allow_output_mutation=True)
|
33 |
def get_palettes():
|
34 |
return list(cm.palettes.keys())
|
35 |
# palettes = dir(palettable.matplotlib)[:-16]
|
requirements.txt
CHANGED
@@ -10,7 +10,7 @@ nbserverproxy
|
|
10 |
owslib
|
11 |
palettable
|
12 |
plotly
|
13 |
-
streamlit
|
14 |
streamlit-bokeh-events
|
15 |
streamlit-folium
|
16 |
streamlit-keplergl
|
|
|
10 |
owslib
|
11 |
palettable
|
12 |
plotly
|
13 |
+
streamlit
|
14 |
streamlit-bokeh-events
|
15 |
streamlit-folium
|
16 |
streamlit-keplergl
|