Update src/streamlit_app.py
Browse files- src/streamlit_app.py +9 -0
src/streamlit_app.py
CHANGED
|
@@ -27,12 +27,21 @@ import pandas as pd
|
|
| 27 |
# Login using e.g. `huggingface-cli login` to access this dataset
|
| 28 |
df = pd.read_parquet("hf://datasets/ProjectMultiplexCoop/PropertyBoundaries/Property_Boundaries_4326.parquet")
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
color_map = {
|
| 31 |
"RESERVE": "#00FF00", # Green
|
| 32 |
"COMMON": "#FF0000", # Red
|
| 33 |
"CORRIDOR": "#0000FF", # Blue
|
| 34 |
}
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
import folium
|
| 37 |
|
| 38 |
m = folium.Map(location=[43.6534817, -79.3839347], zoom_start=12)
|
|
|
|
| 27 |
# Login using e.g. `huggingface-cli login` to access this dataset
|
| 28 |
df = pd.read_parquet("hf://datasets/ProjectMultiplexCoop/PropertyBoundaries/Property_Boundaries_4326.parquet")
|
| 29 |
|
| 30 |
+
features = [
|
| 31 |
+
{"type": row["FEATURE_TYPE"], "geometry": {"type": "Polygon", "coordinates": row["geometry"]}}
|
| 32 |
+
for row in df.iterrows()
|
| 33 |
+
]
|
| 34 |
+
|
| 35 |
color_map = {
|
| 36 |
"RESERVE": "#00FF00", # Green
|
| 37 |
"COMMON": "#FF0000", # Red
|
| 38 |
"CORRIDOR": "#0000FF", # Blue
|
| 39 |
}
|
| 40 |
|
| 41 |
+
import geopandas as gpd
|
| 42 |
+
|
| 43 |
+
gdf = gpd.GeoDataFrame.from_features(features)
|
| 44 |
+
|
| 45 |
import folium
|
| 46 |
|
| 47 |
m = folium.Map(location=[43.6534817, -79.3839347], zoom_start=12)
|