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

Feature/improve geopandas integration #78

Merged
merged 32 commits into from
Feb 7, 2024

Conversation

ryan-kipawa
Copy link
Collaborator

@ryan-kipawa ryan-kipawa commented Jan 24, 2024

We can read results to a DataFrame, and read geometries without results to a GeoDataFrame. Currently, the user is responsible for combining these. This PR aims to facilitate that integration. Here is an example of how you can generate a GeoDataFrame containing the max of all available quantities:

res = Res1D("results.res1d")
gdf = res.reaches.to_geopandas("max")

An internal class called ResultFrameAggregator is introduced to handle the aggregation logic.

@ryan-kipawa ryan-kipawa force-pushed the feature/improve_geopandas_integration branch from 55ccb24 to 0641861 Compare January 30, 2024 15:05
@ryan-kipawa ryan-kipawa marked this pull request as ready for review January 31, 2024 07:46
Copy link
Collaborator

@gedaskir gedaskir left a comment

Choose a reason for hiding this comment

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

Mainly questions in places were it was more difficult to read/understand :-).

mikeio1d/various.py Outdated Show resolved Hide resolved
mikeio1d/pandas_extension/result_frame_aggregator.py Outdated Show resolved Hide resolved
mikeio1d/pandas_extension/result_frame_aggregator.py Outdated Show resolved Hide resolved
mikeio1d/pandas_extension/result_frame_aggregator.py Outdated Show resolved Hide resolved
mikeio1d/pandas_extension/result_frame_aggregator.py Outdated Show resolved Hide resolved
mikeio1d/result_network/result_catchments.py Outdated Show resolved Hide resolved
mikeio1d/result_network/result_location.py Show resolved Hide resolved
mikeio1d/result_network/result_nodes.py Outdated Show resolved Hide resolved
@ryan-kipawa ryan-kipawa merged commit 01d429b into main Feb 7, 2024
4 checks passed
ryan-kipawa added a commit that referenced this pull request Oct 11, 2024
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.

3 participants