Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Jenks #1634

Merged
merged 8 commits into from
Nov 17, 2022
Merged

Jenks #1634

merged 8 commits into from
Nov 17, 2022

Conversation

pmains
Copy link
Contributor

@pmains pmains commented Oct 13, 2022

This feature change adds Jenks Natural Breaks Optimization to choropleths created using Folium.
https://en.wikipedia.org/wiki/Jenks_natural_breaks_optimization

@ocefpaf
Copy link
Member

ocefpaf commented Oct 13, 2022

I would prefer a PR that makes passing the pre-computed bins so users could use whatever they want. However, that may be too complex and would break a lot of code.

With that said, this PR is fine and it makes sense. My only request is to move the import inside the if-clause and add or add try/except clause for it at the top so we cab make it optional. I don't want to increase the number of dependencies in folium.

@pmains
Copy link
Contributor Author

pmains commented Oct 13, 2022

Of course.

To be clear, you want to put the import inside of the if-clause or add a try/except clause, not both, right?

Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! Have some comments, could you take a look?

examples/Jenks.ipynb Outdated Show resolved Hide resolved
examples/Jenks.ipynb Outdated Show resolved Hide resolved
folium/features.py Outdated Show resolved Hide resolved
examples/Jenks.ipynb Outdated Show resolved Hide resolved
examples/Jenks.ipynb Outdated Show resolved Hide resolved
folium/features.py Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Conengmo Conengmo added the waiting for changes This PR has been reviewed and changes are needed before merging label Nov 7, 2022
@Conengmo Conengmo added ready PR is ready for merging and removed waiting for changes This PR has been reviewed and changes are needed before merging labels Nov 17, 2022
@Conengmo Conengmo merged commit bd910b4 into python-visualization:main Nov 17, 2022
@Conengmo
Copy link
Member

Thank you @pmains! Nice addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR is ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants