import streamlit as st import plotly.express as px import geopandas as gpd def display_map(df): # Assuming the data contains Latitude and Longitude fields for the poles # Creating a GeoDataFrame gdf = gpd.GeoDataFrame(df, geometry=gpd.points_from_xy(df['Longitude'], df['Latitude'])) # Plot the map fig = px.scatter_mapbox(gdf, lat=gdf.geometry.y, lon=gdf.geometry.x, color='Alert Level', size_max=10, color_continuous_scale='Reds', hover_name='Pole ID', zoom=7) fig.update_layout(mapbox_style="open-street-map") st.plotly_chart(fig)