1

In my project I receive a DataFrame with scores for cities in the US. I can plot the HeatMap using Folium however I would like to add a colorbar to showcase the numerical values of these scores, based on the color of the HeatMap. Is there a way to do it?. My code so far

cities = pd.read_csv ('../datasets/us.csv'))

cord = cities [["latitude","longitude","score"]]

#create map
base_map = folium.Map(
    width =  "100%",
    height = "100%",
    location = [-15.788497,-47.879873],
    zoom_start = 4
        )


base_map = base_map.add_child(plugins.HeatMap(cord,radius = 20, min_opacity = 0.1))
LucasVaz97
  • 31
  • 2
  • Since the folium heatmap changes colors according to density, it does not match the colors specified in the color map. If the answer is to simply add a colormap to the heatmap, it can be done. Do you need an answer? – r-beginners Dec 10 '21 at 04:08
  • @r-beginners Different person here, would love to see how you would approach this! – ahnnni Mar 29 '22 at 10:28

0 Answers0