Spaces:
Sleeping
Sleeping
Yunus Serhat Bıçakçı
commited on
Commit
·
4b6b86a
1
Parent(s):
678a57c
update
Browse files- pages/4_Choropleth.py +35 -0
pages/4_Choropleth.py
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import leafmap.foliumap as leafmap
|
3 |
+
import leafmap
|
4 |
+
|
5 |
+
st.set_page_config(layout="wide")
|
6 |
+
|
7 |
+
st.sidebar.info(
|
8 |
+
"""
|
9 |
+
- Web App URL: <https://interactive-crime-map.hf.space/>
|
10 |
+
- HuggingFace repository: <https://huggingface.co/spaces/interactive-crime/map/tree/main>
|
11 |
+
"""
|
12 |
+
)
|
13 |
+
|
14 |
+
st.sidebar.title("Contact")
|
15 |
+
st.sidebar.info(
|
16 |
+
"""
|
17 |
+
Yunus Serhat Bıçakçı at [yunusserhat.com](https://yunusserhat.com) | [GitHub](https://github.com/yunusserhat) | [Twitter](https://twitter.com/yunusserhat) | [LinkedIn](https://www.linkedin.com/in/yunusserhat)
|
18 |
+
"""
|
19 |
+
)
|
20 |
+
|
21 |
+
st.title("Choropleth")
|
22 |
+
|
23 |
+
with st.expander("See source code"):
|
24 |
+
with st.echo():
|
25 |
+
data = "https://raw.githubusercontent.com/yunusserhat/Github/main/data/boroughs_count_df_2023.geojson"
|
26 |
+
m = leafmap.Map(center=[51.50, -0.1], zoom=10)
|
27 |
+
m.add_data(
|
28 |
+
data,
|
29 |
+
column = "count",
|
30 |
+
scheme='EqualInterval',
|
31 |
+
cmap='Blues',
|
32 |
+
legend_title='Total Tweet per Borough',
|
33 |
+
)
|
34 |
+
|
35 |
+
m.to_streamlit(height=700)
|