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

Speed up and simplify geography functions with geopandas #43

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

leosaffin
Copy link
Collaborator

I've used the geopandas method from get_basin for the _get_natural_earth_feature function used by other functions in geography, which gives a substantial speed up.

I simplified the sjoin statement a bit by using predicate=contains, so you don't need the reset_index/groupby/first statements, which also gives a good speed up

get_basin now uses _get_natural_earth_feature because it is the same code now

@leosaffin leosaffin merged commit 87d15c1 into Huracan-project:master Sep 6, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant