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/networkx helpers #91

Open
wants to merge 2 commits into
base: feature/networkx-converter
Choose a base branch
from

Conversation

PyMap
Copy link
Collaborator

@PyMap PyMap commented Jan 14, 2022

@sablanchard, this PR includes:

  1. Directed or Undirected MultiGraph parameter implementation for the ua_to_networkx method.
  2. get_node_relations_by_type to get self-loop and multi-edges relations in the urbanaccess_nw object (this pretends to help users to have a better understanding before networkx object instantiation)
  3. network_degree_stats to get sum and average node degree of the networkx object.
  4. from_parallel_to_single_edges to go from multi to single edges.

All of them are shown in the networkx_helpers demo notebook

Directed or Undirected Multigraph object
Evaluate network type before networkx instantiation
Get global metrics for nx object
Go from multiple to single edges
Notebook for demonstrations
@PyMap
Copy link
Collaborator Author

PyMap commented Feb 20, 2022

@sablanchard I found this methods

https://github.com/gboeing/osmnx/blob/main/osmnx/utils_graph.py#L318-L418

that are used to go from parallel to single edges.

I'm proposing something similar here
https://github.com/UDST/urbanaccess/blob/feature/networkx-helpers/urbanaccess/utils.py#L657-L710

... just sharing to add some conext to the proposal.

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