Spaces:
Sleeping
Sleeping
Update pages/market_rent_estimation.py
Browse files
pages/market_rent_estimation.py
CHANGED
|
@@ -28,46 +28,18 @@ def main():
|
|
| 28 |
positions = np.nonzero(mask)[0]
|
| 29 |
distances_matrix_filtered = distances_matrix[np.ix_(positions, positions)]
|
| 30 |
|
| 31 |
-
row_index = df_properties_filtered.index.get_loc(st.session_state['user_select_value'])
|
| 32 |
-
distances = distances_matrix_filtered[row_index]
|
| 33 |
-
sorted_indices = np.argsort(distances)
|
| 34 |
-
sorted_indexes = df_properties_filtered.index[sorted_indices]
|
| 35 |
-
reordered_df_properties_filtered = df_properties_filtered.loc[sorted_indexes].reset_index()
|
| 36 |
|
| 37 |
|
| 38 |
with tab1:
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
# st.session_state['year_buit'] = ""
|
| 44 |
-
# if 'submarket_val' not in st.session_state:
|
| 45 |
-
# st.session_state['submarket_val'] = ""
|
| 46 |
-
# if 'market_val' not in st.session_state:
|
| 47 |
-
# st.session_state['market_val'] = ""
|
| 48 |
-
|
| 49 |
-
# box_contents = [
|
| 50 |
-
# {"header": "Address", "content": st.session_state['user_select_value']},
|
| 51 |
-
# {"header": "LSF", "content": str(st.session_state['property_lsf'])},
|
| 52 |
-
# {"header": "Sub-Market", "content": st.session_state['submarket_val']},
|
| 53 |
-
# {"header": "Market", "content": st.session_state['market_val']}
|
| 54 |
-
# ]
|
| 55 |
-
|
| 56 |
-
# # Divide the layout into four columns
|
| 57 |
-
# col1, col2, col3, col4 = st.columns(4)
|
| 58 |
-
|
| 59 |
-
# for i, col in enumerate([col1, col2, col3, col4]):
|
| 60 |
-
# col.markdown(f"""
|
| 61 |
-
# <div style="padding: 20px; margin: 10px; text-align: center;">
|
| 62 |
-
# <h3 style="font-size: small;">{box_contents[i]['header']}</h3>
|
| 63 |
-
# <p style="font-size: small;">{box_contents[i]['content']}</p>
|
| 64 |
-
# </div>
|
| 65 |
-
# """, unsafe_allow_html=True)
|
| 66 |
-
st.write('Comps list:')
|
| 67 |
-
# display_df = st.table(df_properties_filtered)
|
| 68 |
-
st.write('Comps list:', len(reordered_df_properties_filtered))
|
| 69 |
-
st.write(reordered_df_properties_filtered)
|
| 70 |
-
st.write(distances_matrix_filtered[row_index])
|
| 71 |
with tab2:
|
| 72 |
st.write('Comps list:')
|
| 73 |
st.write('min_property_size_perc:', st.session_state['min_property_size_perc'], min_size)
|
|
|
|
| 28 |
positions = np.nonzero(mask)[0]
|
| 29 |
distances_matrix_filtered = distances_matrix[np.ix_(positions, positions)]
|
| 30 |
|
| 31 |
+
# row_index = df_properties_filtered.index.get_loc(st.session_state['user_select_value'])
|
| 32 |
+
# distances = distances_matrix_filtered[row_index]
|
| 33 |
+
# sorted_indices = np.argsort(distances)
|
| 34 |
+
# sorted_indexes = df_properties_filtered.index[sorted_indices]
|
| 35 |
+
# reordered_df_properties_filtered = df_properties_filtered.loc[sorted_indexes].reset_index()
|
| 36 |
|
| 37 |
|
| 38 |
with tab1:
|
| 39 |
+
st.write(st.session_state['user_select_value'])
|
| 40 |
+
st.write('Comps list:', len(df_properties_filtered))
|
| 41 |
+
st.write(df_properties_filtered)
|
| 42 |
+
st.write(distances_matrix_filtered)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
with tab2:
|
| 44 |
st.write('Comps list:')
|
| 45 |
st.write('min_property_size_perc:', st.session_state['min_property_size_perc'], min_size)
|