Plot colored polygons with geodataframe in folium

后端 未结 3 1351
被撕碎了的回忆
被撕碎了的回忆 2021-02-02 17:14

I\'m trying to plot radar data in folium, and I\'m almost there. I followed this example (Contour plot data (lat,lon,value) within boundaries and export GeoJSON) to get my data

3条回答
  •  庸人自扰
    2021-02-02 17:37

    I don't yet have enough reputation points to comment, so this is a separate answer to clarify the accepted answer written by edub.

    Matplotlib has the colors.to_hex() method already:

    import matplotlib.colors as cl
    
    colors = [cl.to_hex(c) for c in colors]
    

    This would replace the convert_to_hex() method in the accepted answer.

提交回复
热议问题