Crime-Map / pages /5_📍_Marker_Cluster.py
Last commit not found
raw
history blame
1.25 kB
import streamlit as st
import leafmap.foliumap as leafmap
st.set_page_config(layout="wide")
st.sidebar.info(
"""
- Web App URL: <https://streamlit.gishub.org>
- GitHub repository: <https://github.com/giswqs/streamlit-geospatial>
"""
)
st.sidebar.title("Contact")
st.sidebar.info(
"""
Qiusheng Wu at [wetlands.io](https://wetlands.io) | [GitHub](https://github.com/giswqs) | [Twitter](https://twitter.com/giswqs) | [YouTube](https://www.youtube.com/c/QiushengWu) | [LinkedIn](https://www.linkedin.com/in/qiushengwu)
"""
)
st.title("Marker Cluster")
with st.expander("See source code"):
with st.echo():
m = leafmap.Map(center=[51.50, -0.1], zoom=11)
cities = 'https://raw.githubusercontent.com/giswqs/leafmap/master/examples/data/us_cities.csv'
regions = 'https://huggingface.co/spaces/yunusserhat/Crime-Map/blob/main/data/london_boroughs.json'
m.add_geojson(regions, layer_name='London Boroughs')
m.add_points_from_xy(
cities,
x="longitude",
y="latitude",
color_column='region',
icon_names=['gear', 'map', 'leaf', 'globe'],
spin=True,
add_legend=True,
)
m.to_streamlit(height=700)