首页 > 解决方案 > Folium Choropeth 传说重叠

问题描述

请告知我如何调整比例重叠的图例。

""" bins = np.round((df_temp["price_month"].quantile([0, 0.2, 0.4, 0.6, 0.8, 1])))

mymap = folium.Map(location=(singapore_lat,singapore_lng), zoom_start=11,tiles=None)
folium.TileLayer('Stamen Terrain',name="Light Map",control=False).add_to(mymap )
choropleth = folium.Choropleth(
    geo_data=gj,
    data=df_temp,
    name = 'Mean Rental Price',
    columns=['district_number', 'price_month'],
    key_on='feature.properties.id',
    fill_color="BuPu",
    fill_opacity=0.9,
    line_opacity=1,
    threshold_scale = bins,
    legend_name = 'Quantile of Mean Condominium Monthly Rental Price',
    highlight=True,
    show=True,
    nan_fill_color = "black"
    ).add_to(mymap)

"""

在此处输入图像描述

标签: folium

解决方案


推荐阅读