Spaces:
Sleeping
Sleeping
mattritchey
commited on
Commit
•
1a7d116
1
Parent(s):
06329d8
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,6 @@ def get_data(row, col, radius=8):
|
|
47 |
"data/2021_hail.h5",
|
48 |
"data/2020_hail.h5"
|
49 |
]
|
50 |
-
print(files)
|
51 |
all_data = []
|
52 |
all_dates = []
|
53 |
for f in files:
|
@@ -173,8 +172,28 @@ def map_folium(lat, lon,files_dates_selected, within_days ):
|
|
173 |
colormap_hail.add_to(m)
|
174 |
return m
|
175 |
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
#Set up 2 Columns
|
179 |
st.set_page_config(layout="wide")
|
180 |
col1, col2 = st.columns((2))
|
@@ -240,10 +259,7 @@ crop_coords = col-radius, row-radius, col+radius+1, row+radius+1
|
|
240 |
# strokeColor='transparent'
|
241 |
# )
|
242 |
|
243 |
-
|
244 |
-
files_dates_selected = [i for i in files if any(
|
245 |
-
i for j in date_range if str(j) in re.search(r'(\d{8})', i).group())]
|
246 |
-
print(files_dates_selected)
|
247 |
|
248 |
|
249 |
with col1:
|
|
|
47 |
"data/2021_hail.h5",
|
48 |
"data/2020_hail.h5"
|
49 |
]
|
|
|
50 |
all_data = []
|
51 |
all_dates = []
|
52 |
for f in files:
|
|
|
172 |
colormap_hail.add_to(m)
|
173 |
return m
|
174 |
|
175 |
+
|
176 |
+
files = glob.glob(r'webp/**/*.webp', recursive=True)
|
177 |
+
files_dates_selected = [i for i in files if any(
|
178 |
+
i for j in date_range if str(j) in re.search(r'(\d{8})', i).group())]
|
179 |
+
print(files_dates_selected)
|
180 |
+
|
181 |
+
files = [
|
182 |
+
"data/2023_hail.h5",
|
183 |
+
"data/2022_hail.h5",
|
184 |
+
"data/2021_hail.h5",
|
185 |
+
"data/2020_hail.h5"
|
186 |
+
]
|
187 |
+
|
188 |
+
all_dates = []
|
189 |
+
for f in files:
|
190 |
+
with h5py.File(f, 'r') as f:
|
191 |
+
|
192 |
+
dates = f['dates'][:]
|
193 |
+
print(dates)
|
194 |
+
|
195 |
+
all_dates.append(dates)
|
196 |
+
|
197 |
#Set up 2 Columns
|
198 |
st.set_page_config(layout="wide")
|
199 |
col1, col2 = st.columns((2))
|
|
|
259 |
# strokeColor='transparent'
|
260 |
# )
|
261 |
|
262 |
+
|
|
|
|
|
|
|
263 |
|
264 |
|
265 |
with col1:
|