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

Option to summarise attributes when merging multiple edges or contracting nodes #113

Closed
luukvdmeer opened this issue Jan 30, 2021 · 1 comment
Assignees
Labels
feature 🎁 Request a new feature
Milestone

Comments

@luukvdmeer
Copy link
Owner

Is your feature request related to a problem? Please describe.
When simplifying a network, sets of edges that connect the same pair of nodes (i.e. multiple edges) get reduced to one. Currently that is done by simply keeping the first edge of such a set, and removing the others. However, consider a case where you have several edges connecting node A and B, and each edge is describing a flow of a certain transport mode (this example I got from ITSLeeds/od#20). Then, when you want to merge all these edges, you want the resulting edge to have the sum of all flows as flow value, and not just the flow of the first edge. Probably there are more cases where it makes sense to combine the attributes of the original edges in some way (sum, mean, mode, ...). It would be nice to be able to specify this on a per-attribute basis.

The same could be applied to node contraction: when several nodes get contracted into a single one, you may want to specify how you want to combine the node attributes.

@luukvdmeer luukvdmeer added the feature 🎁 Request a new feature label Jan 30, 2021
@luukvdmeer luukvdmeer added this to the v0.4.2 milestone Jan 30, 2021
@luukvdmeer luukvdmeer self-assigned this Jan 30, 2021
@luukvdmeer
Copy link
Owner Author

This is implemented now. Examples can be seen in the morpher vignette (contraction and simplification) and in the cleaning vignette (contraction and simplification)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎁 Request a new feature
Projects
None yet
Development

No branches or pull requests

1 participant