Spaces:
Sleeping
Sleeping
Yunus Serhat Bıçakçı
commited on
Commit
·
11cf8c1
1
Parent(s):
16ee35c
update
Browse files- pages/3_😡_Hate_Tweets.py +25 -11
pages/3_😡_Hate_Tweets.py
CHANGED
@@ -43,16 +43,30 @@ m = leafmap.Map(center=[51.50, -0.1], zoom=10)
|
|
43 |
tweets = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/London2022DecHateTweetsLatLong.csv'
|
44 |
borough = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/londonborough.geojson'
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
m.to_streamlit()
|
|
|
43 |
tweets = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/London2022DecHateTweetsLatLong.csv'
|
44 |
borough = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/londonborough.geojson'
|
45 |
|
46 |
+
tweets2 = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/multiclass_latest_latlng.csv'
|
47 |
+
borough2 = 'https://raw.githubusercontent.com/yunusserhat/data/main/data/londonborough.geojson'
|
48 |
+
|
49 |
+
map_option = st.selectbox('Choose a Map', ('Model 1', 'Model 2'))
|
50 |
+
|
51 |
+
if map_option == 'Model 1':
|
52 |
+
m.add_geojson(borough, layer_name='London Boroughs')
|
53 |
+
m.add_points_from_xy(
|
54 |
+
tweets,
|
55 |
+
x="Longitude",
|
56 |
+
y="Latitude",
|
57 |
+
color_column='Hate Prediction',
|
58 |
+
spin=True,
|
59 |
+
add_legend=True
|
60 |
+
)
|
61 |
+
else:
|
62 |
+
m.add_geojson(borough2, layer_name='London Boroughs 2')
|
63 |
+
m.add_points_from_xy(
|
64 |
+
tweets2,
|
65 |
+
x="Longitude",
|
66 |
+
y="Latitude",
|
67 |
+
color_column='Hate Prediction',
|
68 |
+
spin=True,
|
69 |
+
add_legend=True
|
70 |
+
)
|
71 |
|
72 |
m.to_streamlit()
|