Update app.py
Browse files
app.py
CHANGED
@@ -298,9 +298,9 @@ if __name__ == "__main__":
|
|
298 |
st.subheader("π 3D Map Visualization (World Map)")
|
299 |
|
300 |
fig_world = create_3d_world_map(world_gdf, gdf, selected_areas, fill_colors, border_colors,
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
st.plotly_chart(fig_world, use_container_width=True)
|
305 |
|
306 |
# Add download buttons for both 3D maps
|
@@ -327,12 +327,14 @@ if __name__ == "__main__":
|
|
327 |
mime="text/html"
|
328 |
)
|
329 |
|
|
|
|
|
330 |
# Add new function for world map visualization after create_3d_map():
|
331 |
|
332 |
def create_3d_world_map(world_gdf, selected_gdf, selected_areas, fill_colors, border_colors,
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
fig_world = go.Figure()
|
337 |
added_to_legend = set()
|
338 |
|
@@ -452,6 +454,7 @@ def create_3d_world_map(world_gdf, selected_gdf, selected_areas, fill_colors, bo
|
|
452 |
)
|
453 |
return fig_world
|
454 |
|
|
|
455 |
# Wrap the main execution in a try-except block
|
456 |
if __name__ == "__main__":
|
457 |
try:
|
|
|
298 |
st.subheader("π 3D Map Visualization (World Map)")
|
299 |
|
300 |
fig_world = create_3d_world_map(world_gdf, gdf, selected_areas, fill_colors, border_colors,
|
301 |
+
legend_title, legend_font_size, legend_font_weight,
|
302 |
+
legend_bg_color, legend_border_color, legend_border_width,
|
303 |
+
legend_columns)
|
304 |
st.plotly_chart(fig_world, use_container_width=True)
|
305 |
|
306 |
# Add download buttons for both 3D maps
|
|
|
327 |
mime="text/html"
|
328 |
)
|
329 |
|
330 |
+
|
331 |
+
|
332 |
# Add new function for world map visualization after create_3d_map():
|
333 |
|
334 |
def create_3d_world_map(world_gdf, selected_gdf, selected_areas, fill_colors, border_colors,
|
335 |
+
legend_title, legend_font_size, legend_font_weight,
|
336 |
+
legend_bg_color, legend_border_color, legend_border_width,
|
337 |
+
legend_columns):
|
338 |
fig_world = go.Figure()
|
339 |
added_to_legend = set()
|
340 |
|
|
|
454 |
)
|
455 |
return fig_world
|
456 |
|
457 |
+
|
458 |
# Wrap the main execution in a try-except block
|
459 |
if __name__ == "__main__":
|
460 |
try:
|