I have a geodataframe called gdf_isochrone
that consists of 3 polygons:
isochrone_id travel_time_mins geometry furthest_distance speed category
0 is15 15 POLYGON ((106.77372 -6.23474, 106.77612 -6.234... 8901 35.604 0
1 is30 30 POLYGON ((106.74866 -6.21551, 106.75072 -6.214... 19130 38.260 1
2 is60 60 POLYGON ((106.67107 -6.21208, 106.67244 -6.207... 33835 33.835 2
I use geopandas.explore to map it using:
gdf_isochrone.explore(
column = 'travel_time_mins',
vmin = 0,
vmax = 60,
legend = True,
tooltip = True
)
How do I make the color to be:
travel_time_mins = 15, then green
travel_time_mins = 30, then yellow
travel_time_mins = 60, then red
Adjust the
cmap
parameter: https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.explore.htmlIt takes more time to type that whole question than to read the docs.