urbanaccess
urbanaccess copied to clipboard
Feature/networkx helpers
@sablanchard, this PR includes:
- Directed or Undirected MultiGraph parameter implementation for the
ua_to_networkxmethod. get_node_relations_by_typeto get self-loop and multi-edges relations in theurbanaccess_nwobject (this pretends to help users to have a better understanding before networkx object instantiation)network_degree_statsto get sum and average node degree of the networkx object.from_parallel_to_single_edgesto go from multi to single edges.
All of them are shown in the networkx_helpers demo notebook
@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.