Skip to content

Update the colormap HTML representation #110

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

HaudinFlorence
Copy link
Contributor

@HaudinFlorence HaudinFlorence commented May 4, 2022

Update the colormap HTML representation to match the way it renders on Folium maps.
Here is a preview of the colormap used with Choropleth layer from ipyleaflet.

Screenshot from 2022-05-04 09-59-32

@HaudinFlorence HaudinFlorence force-pushed the update_linear_colormap branch from 3cb8385 to d215c3f Compare May 4, 2022 10:18
@HaudinFlorence HaudinFlorence force-pushed the update_linear_colormap branch from d215c3f to cc82787 Compare May 4, 2022 10:20
@martinRenou
Copy link

@ocefpaf it would be great if you could consider this PR for the next release :) We'd like to use branca more in ipyleaflet

@HaudinFlorence
Copy link
Contributor Author

@ocefpaf it would be great if you could consider this PR for the next release :) We'd like to use branca more in ipyleaflet
Screenshot from 2022-05-05 16-28-14-2

Here is another example of the use of Branca and the custom colormap in ipyleaflet

@HaudinFlorence
Copy link
Contributor Author

HaudinFlorence commented Aug 4, 2022

@Conengmo @ocefpaf Another possible use of the customized Branca colormap proposed in this PR is with Heatmap layer (adaptation of the code investigated right now) . So this makes 3 layers possibly using this colormap in ipyleaflet :-).
heatmap

@davidbrochart
Copy link

davidbrochart commented Aug 11, 2022

It looks like the maintainers are busy, we'd like to move forwards with this.
Is there any way we can help you @ocefpaf? Maybe you can give one of us commit rights?

@martinfleis
Copy link
Collaborator

Also happy to help with branca and folium maintenance if needed.

@HaudinFlorence
Copy link
Contributor Author

Hello, is there any way of making things progress on this PR please ? Many thanks.

@Conengmo
Copy link
Member

Conengmo commented Nov 4, 2022

I had to check, because I normally don't use the Colormap._repr_html_ method. It does look better this way! It would be nice to reuse more of the code/template we use in the 'normal' render function, but that shouldn't hold back this change.

  • I added a docstring to the method.
  • Changed the example notebook to not use ipyleaflet, since that's currently not a (dev) dependency for branca. It still shows the example fine.

I'll merge after the tests ran.

@ocefpaf
Copy link
Member

ocefpaf commented Nov 4, 2022

Also happy to help with branca and folium maintenance if needed.

I completely missed this PR and the comments here, sorry. BTW, I'd love to take on your offer here. Does that still stands?

@Conengmo Conengmo merged commit 2caa26d into python-visualization:master Nov 4, 2022
@martinfleis
Copy link
Collaborator

BTW, I'd love to take on your offer here. Does that still stands?

@ocefpaf Yeah, it does. Now that we have exposed folium in geopandas it seems beneficial to have a bit of overlap in maintenance to channel issues and fixes to the right place. And I hope it may also help shorten the release cycle of folium.

@ocefpaf
Copy link
Member

ocefpaf commented Nov 4, 2022

@martinfleis I'm assuming you are in for branca and folium, right?

@HaudinFlorence are you or others in your team interested too? Would that be only branca b/c it is now an ipyleaflet dependency?

@martinfleis
Copy link
Collaborator

I'm assuming you are in for branca and folium, right?

Yup. Can't promise a ton of activity but some for sure.

@ocefpaf
Copy link
Member

ocefpaf commented Nov 4, 2022

Can't promise a ton of activity but some for sure.

I'm sure it will be more than what I have been offering these projects lately :-)

@HaudinFlorence
Copy link
Contributor Author

@HaudinFlorence are you or others in your team interested too? Would that be only branca b/c it is now an ipyleaflet dependency?

Thanks a lot for merging the PR @ocefpaf . We might indeed mainly contribute to branca to upstream features needed in ipyleaflet

@martinRenou
Copy link

Happy to help contribute too!

@ocefpaf
Copy link
Member

ocefpaf commented Nov 9, 2022

You three should have access to branca and Martin also has access to folium. Thanks!

@HaudinFlorence
Copy link
Contributor Author

You three should have access to branca and Martin also has access to folium. Thanks!

@ocefpaf Can you please re regive me access to Branca. I left the organization by mistake. Thanks.

@el-gif
Copy link

el-gif commented Oct 15, 2024

Hello @HaudinFlorence, how do you know which colormap (viridis, plasma etc.) to use for the correct matching in your screenshots of the Heatmap and Velocity layers? Also, I am working with Shiny for Python to create a Webapp and ColormapControl doesn't seem to work in this constellation (ColormapControl created in the server function).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants