Yunus Serhat Bıçakçı commited on
Commit
ff78739
·
1 Parent(s): 066bfc6
Files changed (1) hide show
  1. pages/4_Test.py +2 -2
pages/4_Test.py CHANGED
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
3
  import pandas as pd
4
 
5
  boroughs_count_2022_dec_df = "https://raw.githubusercontent.com/yunusserhat/data/main/data/boroughs_count_df_2022_dec.geojson"
6
- mps_hate_2022_dec_df = "https://raw.githubusercontent.com/yunusserhat/data/main/data/mps_hate_2022_dec_count.geojson"
7
 
8
  # Initialize the map centered around London
9
  m = folium.Map(location=[51.5074, -0.1278], zoom_start=10)
@@ -13,7 +13,7 @@ boroughs_count_2022_dec_df = "https://raw.githubusercontent.com/yunusserhat/data
13
  # Choropleth map for Hate Tweets by Borough
14
  folium.Choropleth(
15
  geo_data=boroughs_count_2022_dec_df,
16
- data=boroughs_count_2022_dec_df,
17
  columns=["geo.name", "count"],
18
  key_on="feature.properties.geo.name",
19
  fill_color="YlOrRd",
 
3
  import pandas as pd
4
 
5
  boroughs_count_2022_dec_df = "https://raw.githubusercontent.com/yunusserhat/data/main/data/boroughs_count_df_2022_dec.geojson"
6
+ data_dict = boroughs_count_2022_dec_df.set_index("geo.name")["count"].to_dict()
7
 
8
  # Initialize the map centered around London
9
  m = folium.Map(location=[51.5074, -0.1278], zoom_start=10)
 
13
  # Choropleth map for Hate Tweets by Borough
14
  folium.Choropleth(
15
  geo_data=boroughs_count_2022_dec_df,
16
+ data=data_dict,
17
  columns=["geo.name", "count"],
18
  key_on="feature.properties.geo.name",
19
  fill_color="YlOrRd",