Spaces:
Sleeping
Sleeping
mattritchey
commited on
Commit
•
06329d8
1
Parent(s):
f56cdde
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def get_data(row, col, radius=8):
|
|
47 |
"data/2021_hail.h5",
|
48 |
"data/2020_hail.h5"
|
49 |
]
|
50 |
-
|
51 |
all_data = []
|
52 |
all_dates = []
|
53 |
for f in files:
|
@@ -97,10 +97,12 @@ def map_folium(lat, lon,files_dates_selected, within_days ):
|
|
97 |
dates.append(formatted_date)
|
98 |
overlay.add_to(m)
|
99 |
|
100 |
-
|
101 |
# HTML template for the slider control with dates
|
102 |
template_1 = '{% macro html(this, kwargs) %}' + f"""
|
103 |
|
|
|
|
|
104 |
<div id="slider-control" style="position: fixed; top: 50px; left: 50px; z-index: 9999; background-color: white; padding: 10px; border-radius: 5px; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);">
|
105 |
<label for="image-slider">Select Date:</label>
|
106 |
<input type="range" min="0" max="{len(dates)-1}" value="{within_days}" class="slider" id="image-slider" style="width: 150px;" oninput="updateFromSlider(this.value)">
|
@@ -241,6 +243,7 @@ crop_coords = col-radius, row-radius, col+radius+1, row+radius+1
|
|
241 |
files = glob.glob(r'webp\**\*.webp', recursive=True)
|
242 |
files_dates_selected = [i for i in files if any(
|
243 |
i for j in date_range if str(j) in re.search(r'(\d{8})', i).group())]
|
|
|
244 |
|
245 |
|
246 |
with col1:
|
|
|
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:
|
|
|
97 |
dates.append(formatted_date)
|
98 |
overlay.add_to(m)
|
99 |
|
100 |
+
|
101 |
# HTML template for the slider control with dates
|
102 |
template_1 = '{% macro html(this, kwargs) %}' + f"""
|
103 |
|
104 |
+
|
105 |
+
|
106 |
<div id="slider-control" style="position: fixed; top: 50px; left: 50px; z-index: 9999; background-color: white; padding: 10px; border-radius: 5px; box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);">
|
107 |
<label for="image-slider">Select Date:</label>
|
108 |
<input type="range" min="0" max="{len(dates)-1}" value="{within_days}" class="slider" id="image-slider" style="width: 150px;" oninput="updateFromSlider(this.value)">
|
|
|
243 |
files = glob.glob(r'webp\**\*.webp', recursive=True)
|
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:
|