Borya-Goldarb commited on
Commit
69e22f7
·
verified ·
1 Parent(s): 3b0f93b

Update pages/market_rent_estimation.py

Browse files
Files changed (1) hide show
  1. pages/market_rent_estimation.py +21 -16
pages/market_rent_estimation.py CHANGED
@@ -180,24 +180,29 @@ def main():
180
  gdf_Atlanta = gdf[gdf.full_submarket.str.contains("Atlanta")]
181
  folium.GeoJson(data=gdf_Atlanta.geometry.to_json(), name='geojson').add_to(m)
182
  for _, row in gdf_Atlanta.iterrows():
183
- # # Convert the row's geometry to GeoJSON
184
- # geojson = folium.GeoJson(data=row['geometry'].__geo_interface__)
 
 
 
 
 
 
 
 
185
 
186
- # # Add a popup with the name
187
- # popup = folium.Popup(row['full_submarket'], parse_html=True)
188
-
189
- # # Add the GeoJson and Popup to the map
190
- # geojson.add_child(popup).add_to(m)
191
 
192
- folium.GeoJson(
193
- data=row['geometry'].__geo_interface__,
194
- style_function=lambda feature: {
195
- 'fillColor': '#00000000', # Make the fill color transparent
196
- 'color': 'blue', # Set the border color
197
- 'weight': 2 # Set the border width
198
- },
199
- tooltip=folium.Tooltip(row['full_submarket']) # Add a tooltip with the name
200
- ).add_to(m)
201
 
202
  # Add layer control to toggle marker visibility
203
  folium.LayerControl().add_to(m)
 
180
  gdf_Atlanta = gdf[gdf.full_submarket.str.contains("Atlanta")]
181
  folium.GeoJson(data=gdf_Atlanta.geometry.to_json(), name='geojson').add_to(m)
182
  for _, row in gdf_Atlanta.iterrows():
183
+ # Convert the row's geometry to GeoJSON
184
+ geojson = folium.GeoJson(data=row['geometry'].__geo_interface__,
185
+ style_function=lambda feature: {
186
+ 'fillColor': '#00000000', # Make the fill color transparent
187
+ 'color': '#00000000', # Set the border color
188
+ 'weight': 2 # Set the border width
189
+ },
190
+ )
191
+ # Add a popup with the name
192
+ popup = folium.Popup(row['full_submarket'], parse_html=True)
193
 
194
+ # Add the GeoJson and Popup to the map
195
+ geojson.add_child(popup).add_to(m)
 
 
 
196
 
197
+ # folium.GeoJson(
198
+ # data=row['geometry'].__geo_interface__,
199
+ # style_function=lambda feature: {
200
+ # 'fillColor': '#00000000', # Make the fill color transparent
201
+ # 'color': 'blue', # Set the border color
202
+ # 'weight': 2 # Set the border width
203
+ # },
204
+ # tooltip=folium.Tooltip(row['full_submarket']) # Add a tooltip with the name
205
+ # ).add_to(m)
206
 
207
  # Add layer control to toggle marker visibility
208
  folium.LayerControl().add_to(m)