iduedu.edge_betweenness¶
- iduedu.edge_betweenness(urban_graph, *, cutoffs=None, weight='length_meter', node_weights=None, sample=None, seed=0, max_workers=None)[source]¶
Betweenness of the edges of a graph: how many shortest paths within a threshold run along each edge.
Paths are counted as in
centrality(). An edge that can be travelled both ways carries the paths of both directions. Among parallel edges only the cheapest one carries paths; equally cheap ones share them.- Parameters:
urban_graph (
UrbanGraph) – Graph to measure.cutoffs (
Union[float,Iterable[float],None]) – Threshold or thresholds in the units ofweight;Nonefor no limit.weight (
Literal['length_meter','time_min']) – Edge cost column:length_meter(metres, the default) ortime_min(minutes).node_weights (
str|Series|ndarray|None) – Weights of the path ends, seecentrality().sample (
int|None) – Number of randomly chosen source nodes; the result is scaled up to all nodes.max_workers (
int|None) – Number of threads;Noneuses all cores.
- Return type:
- Returns:
DataFrame indexed like
edges_gdfwith one columnbetweenness_<cutoff>per threshold.