Unsure how to use colormap with Folium marker plot
I'm in a rush, but this is how I've done it in the past. Create the CM and then call it like so colormap(.9)
import foliumimport pandas as pdimport folium.pluginsimport brancaimport branca.colormap as cmdata = [ [33.823400, -118.12194, 99.23], [33.823500, -118.12294, 95.23], [33.823600, -118.12394, 91.23], [33.823700, -118.12494, 90.00]]df = pd.DataFrame(data, columns=['latitude','longitude','power'])x_start = (df['latitude'].max() + df['latitude'].min()) / 2y_start = (df['longitude'].max() + df['longitude'].min()) / 2start_coord = (x_start, y_start)colormap = cm.LinearColormap(colors=['red','lightblue'], index=[90,100],vmin=90,vmax=100)map = folium.Map(location=start_coord, zoom_start=12)lat = list(df.latitude)lon = list(df.longitude)pow = list(df.power)for loc, p in zip(zip(lat, lon), pow): folium.Circle( location=loc, radius=10, fill=True, color=colormap(p), #fill_opacity=0.7 ).add_to(map)map.add_child(colormap)display(map)