cartagen.rural_betweeness#
- rural_betweeness(roads, sample_size=10, threshold=0, cost=None)#
Detect central roads inside a network using betweeness centrality.
This algorithm is used to detect central road inside the network. It is primarily used to eliminate less used roads in rural areas. The centrality of the road sections are determiined using the betweeness centrality.
- Parameters:
roads (
GeoDataFrameofLineString) – The road network to analyze.sample_size (
int, optional) – The percentage of nodes to keep for the betweenness calculation. Higher values means better results at the cost of exponential computation length.threshold (
int, optional) – The minimum betweenness value for the road to be kept.cost (
str, optional) – The name of the attribute giving the cost of the road section. Make sure the attribute is a number. Default to None, which means the length of the road is used as the cost.
- Returns:
See also
rural_trafficDetect central roads inside a network using traffic simulation.
Notes
This algorithm is based on Touya [1] but the traffic simulation is replaced by the calculation of the betweeness centrality, which is less resource-intensive. However, it is harder to find the right betweeness threshold to use, and some road sections might become unconnected to the rest of the network.
References