folium icon indicating copy to clipboard operation
folium copied to clipboard

help for Choropleth(fill_color=...) is missing values

Open FlorinAndrei opened this issue 2 years ago • 3 comments

Describe the bug

https://github.com/python-visualization/folium/blob/main/folium/features.py#L1372

Quote:

fill_color: string, optional
    Area fill color, defaults to blue. Can pass a hex code, color name,
    or if you are binding data, one of the following color brewer palettes:
    'BuGn', 'BuPu', 'GnBu', 'OrRd', 'PuBu', 'PuBuGn', 'PuRd', 'RdPu',
    'YlGn', 'YlGnBu', 'YlOrBr', and 'YlOrRd'.

This is incomplete. You can also do Choropleth(fill_color='viridis') and it works just fine.

So it looks like it can use other things from branca.colormap but I'm not sure what is the full extent of options that Choropleth would accept.

Expected behavior

The help should describe the actual behavior there. I would propose a PR, but again, I am not sure what are all the options that are acceptable there.

FlorinAndrei avatar May 23 '23 00:05 FlorinAndrei

Related: https://github.com/python-visualization/branca/pull/131

Conengmo avatar May 23 '23 06:05 Conengmo

Thanks for pointing that out! I’m not sure at the moment what options would work, we’d need someone to look into that. We can definitely update the documentation when we know. Ideally we’d not necessarily list all the options here, but could refer to Branca.

Conengmo avatar May 23 '23 06:05 Conengmo

Ideally we’d not necessarily list all the options here, but could refer to Branca.

Sounds good, thanks.

FlorinAndrei avatar May 23 '23 18:05 FlorinAndrei