Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
•
d54bc6d
1
Parent(s):
4f1c352
Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,7 @@ with st.sidebar:
|
|
109 |
|
110 |
# Slider for setting the radius
|
111 |
if radius_visible:
|
112 |
-
radius_in_meters = st.slider('Selecione raio (em metros)', min_value=100, max_value=5000, value=1000)
|
113 |
|
114 |
# Calculate a zoom level based on the radius
|
115 |
radius_zoom_mapping = {
|
@@ -138,7 +138,7 @@ with st.sidebar:
|
|
138 |
# Slider for setting the zoom level
|
139 |
if selected_coords == 'Custom' and not radius_visible:
|
140 |
# Use the zoom level slider based on the entire dataset
|
141 |
-
zoom_level = st.slider('Nível de zoom', min_value=1, max_value=15, value=zoom_level_all)
|
142 |
else:
|
143 |
for index, row in data.iterrows():
|
144 |
distance_all = calculate_distance(row['latitude'], row['longitude'], data['latitude'].mean(), data['longitude'].mean())
|
@@ -151,9 +151,9 @@ with st.sidebar:
|
|
151 |
# Slider for setting the zoom level based on the entire dataset
|
152 |
zoom_level = st.slider('Nível de zoom', min_value=1, max_value=15, value=zoom_level_all)
|
153 |
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
|
158 |
# Filter data based on the radius
|
159 |
if selected_coords == 'Custom':
|
|
|
109 |
|
110 |
# Slider for setting the radius
|
111 |
if radius_visible:
|
112 |
+
radius_in_meters = st.slider('Selecione raio (em metros)', key='radius_slider', min_value=100, max_value=5000, value=1000)
|
113 |
|
114 |
# Calculate a zoom level based on the radius
|
115 |
radius_zoom_mapping = {
|
|
|
138 |
# Slider for setting the zoom level
|
139 |
if selected_coords == 'Custom' and not radius_visible:
|
140 |
# Use the zoom level slider based on the entire dataset
|
141 |
+
zoom_level = st.slider('Nível de zoom', key='zoom_level_slider', min_value=1, max_value=15, value=zoom_level_all)
|
142 |
else:
|
143 |
for index, row in data.iterrows():
|
144 |
distance_all = calculate_distance(row['latitude'], row['longitude'], data['latitude'].mean(), data['longitude'].mean())
|
|
|
151 |
# Slider for setting the zoom level based on the entire dataset
|
152 |
zoom_level = st.slider('Nível de zoom', min_value=1, max_value=15, value=zoom_level_all)
|
153 |
|
154 |
+
# Conditionally render the radius slider
|
155 |
+
if radius_visible:
|
156 |
+
radius_in_meters = st.slider('Selecione raio (em metros)', key='conditional_radius_slider', min_value=100, max_value=5000, value=1000)
|
157 |
|
158 |
# Filter data based on the radius
|
159 |
if selected_coords == 'Custom':
|