File size: 1,736 Bytes
bb4a729
 
85ae1c9
 
bb4a729
 
 
 
 
1f3e989
 
bb4a729
 
 
 
 
 
b0e4312
bb4a729
 
 
b0e4312
bb4a729
 
 
929de88
bb4a729
929de88
bb4a729
 
 
 
 
03f2f35
bb4a729
 
929de88
 
bb4a729
 
929de88
6c0b6f0
929de88
 
 
 
 
6c0b6f0
 
929de88
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import streamlit as st
import leafmap.foliumap as leafmap
import webbrowser
webbrowser.open("http://streamlit.io") # opens the URL in a new tab

st.set_page_config(layout="wide")

st.sidebar.info(
    """
    - Web App URL: <https://interactive-crime-map.hf.space/>
    - HuggingFace repository: <https://huggingface.co/spaces/interactive-crime/map/tree/main>
    """
)

st.sidebar.title("Contact")
st.sidebar.info(
    """
    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)
    """
)

st.title("Interactive Crime Map Application")

st.markdown(
    """
    This interactive crime map apps created using [streamlit](https://streamlit.io) and open-source mapping libraries, 
    such as [leafmap](https://leafmap.org), [geemap](https://geemap.org), [pydeck](https://deckgl.readthedocs.io), and [kepler.gl](https://docs.kepler.gl/docs/keplergl-jupyter).
    
    """
)

st.info("Click on the left sidebar menu to navigate to the different apps.")

st.subheader("Interactive Crime Map Application")
st.markdown(
    """
    
    """
)

m = leafmap.Map(center=[51.50, -0.1], zoom=10)
tweets = 'https://raw.githubusercontent.com/yunusserhat/Github/main/data/London2022DecHateTweetsLatLong.csv'
borough = 'https://raw.githubusercontent.com/yunusserhat/Github/main/data/londonborough.geojson'

m.add_geojson(borough, layer_name='London Boroughs')
m.add_points_from_xy(
    tweets,
    x="Longitude",
    y="Latitude"
    # ,
    # color_column='hate_pred',
    # icon_names=['gear', 'map', 'leaf', 'globe'],
    # spin=True,
    # add_legend=True,
)
m.to_streamlit(height=700)