'networkX creating a subgraph from a road network based on edges properties
I have a road network, on which each segment has a ranking number from 1 to 5, which shows the importance of the road. I would like to create a sub-network that includes all the edges (roads) with the highest number of 1 and most of the edges with the number 2. I am saying most because these edges are not adjacent and definitely it would be trade of between the most important edges and some edges that I choose for the sake of connectivity! In order to choose the ones for connectivity, Some criteria would be defined, like the edge with the same name and the ones that are closer have higher priority!
Even some guide to how approach the problem and how proceed or pointing to similar issues would be a great help.
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
