Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
•
1a07133
1
Parent(s):
9c4dcb3
Update app.py
Browse files
app.py
CHANGED
@@ -179,6 +179,34 @@ with st.sidebar:
|
|
179 |
if radius_visible:
|
180 |
radius_in_meters = st.slider('Selecione raio (em metros)', min_value=100, max_value=5000, value=1000)
|
181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
# Links to other apps at the bottom of the sidebar
|
183 |
st.sidebar.markdown(factor_html, unsafe_allow_html=True)
|
184 |
st.sidebar.markdown(evo_html, unsafe_allow_html=True)
|
|
|
179 |
if radius_visible:
|
180 |
radius_in_meters = st.slider('Selecione raio (em metros)', min_value=100, max_value=5000, value=1000)
|
181 |
|
182 |
+
# Add sliders to filter data based
|
183 |
+
atotal_range = st.slider('Área Total', float(data['Atotal'].min()), float(data['Atotal'].max()), (float(data['Atotal'].min()), float(data['Atotal'].max())))
|
184 |
+
apriv_range = st.slider('Área Privativa', float(data['Apriv'].min()), float(data['Apriv'].max()), (float(data['Apriv'].min()), float(data['Apriv'].max())))
|
185 |
+
dorm_range = st.slider('Dormitórios', float(data['Dorm'].min()), float(data['Dorm'].max()), (float(data['Dorm'].min()), float(data['Dorm'].max())))
|
186 |
+
banho_range = st.slider('Banheiros', float(data['Banheiro'].min()), float(data['Banheiro'].max()), (float(data['Banheiro'].min()), float(data['Banheiro'].max())))
|
187 |
+
vaga_range = st.slider('Vaga de estacionamento', float(data['Vaga'].min()), float(data['Vaga'].max()), (float(data['Vaga'].min()), float(data['Vaga'].max())))
|
188 |
+
|
189 |
+
# Add checkboxes for dummy features
|
190 |
+
elev_checkbox = st.checkbox('Elevador')
|
191 |
+
churr_checkbox = st.checkbox('Churrasqueira')
|
192 |
+
esq_checkbox = st.checkbox('Duas ou mais frentes')
|
193 |
+
|
194 |
+
# Transform checkbox values into 1s and 0s
|
195 |
+
elev_value = 1 if elev_checkbox else 0
|
196 |
+
churr_value = 1 if churr_checkbox else 0
|
197 |
+
esq_value = 1 if esq_checkbox else 0
|
198 |
+
|
199 |
+
data = data[(data['Tipo'] == selected_tipo) &
|
200 |
+
(data['Atotal'] == atotal_range) &
|
201 |
+
(data['Apriv'] == apriv_range) &
|
202 |
+
(data['Dorm'] == dorm_range) &
|
203 |
+
(data['Banheiro'] == banho_range) &
|
204 |
+
(data['Vaga'] == vaga_range) &
|
205 |
+
(data['Elevador'] == elev_value) &
|
206 |
+
(data['Churrasq'] == churr_value) &
|
207 |
+
(data['Lot_pos'] == esq_value)]
|
208 |
+
|
209 |
+
|
210 |
# Links to other apps at the bottom of the sidebar
|
211 |
st.sidebar.markdown(factor_html, unsafe_allow_html=True)
|
212 |
st.sidebar.markdown(evo_html, unsafe_allow_html=True)
|