Skip to content
Snippets Groups Projects
Commit 911cb264 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: only render polygon in py

parent 92b7f4bd
No related branches found
No related tags found
1 merge request!3Choropleth map implementation
......@@ -70,9 +70,12 @@ if __name__ == "__main__":
# Load GeoJSON data using geopandas
geo_data = gpd.read_file("server/map/mjosa.geojson")
# Plot choropleth map
geo_data.plot()
plt.title('Test_map')
# Filter only polygons
polygon_data = geo_data[geo_data['geometry'].geom_type == 'Polygon']
# Plot polygons
polygon_data.plot()
plt.title('Polygons in Mjøsa GeoJSON')
plt.xlabel('Longitude')
plt.ylabel('Latitude')
plt.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment