| walk_betweenness | R Documentation |
Computes the edge betweenness centrality for all street segments in a walkable network. Betweenness measures the proportion of potential shortest paths that traverse each street segment. A high value denotes a critical bridge, connector, or structural bottleneck: if interrupted, many potential routes are forced to divert.
walk_betweenness(
network,
snap_tolerance_m = 0,
radius_m = NULL,
weights = "length_m",
directed = FALSE,
normalized = TRUE
)
network |
A |
snap_tolerance_m |
Numeric. Radius in meters for network gap correction (snapping tolerance). If > 0, repairs unconnected endpoints before graph construction. Default is 0.0. |
radius_m |
Optional numeric. Maximum metric search radius (cutoff) for shortest paths.
If |
weights |
Character string naming the edge attribute used for path lengths. Default is |
directed |
Logical. If |
normalized |
Logical. If |
The betweenness centrality of an edge e is defined as:
C_B(e) = \sum_{s \neq t} \frac{\sigma_{st}(e)}{\sigma_{st}}
where \sigma_{st} is the total number of shortest paths from node s to node t,
and \sigma_{st}(e) is the number of those paths that pass through edge e.
Important Methodological Note: Betweenness is a purely structural topological metric. It is not a traffic volume count (aforo) nor a congestion forecast. The tool does not assume vehicle volumes, origin-destination matrices, travel schedules, one-way regulations, or actual speeds. Consequently, high-betweenness (highlighted in red) street segments represent structural network priorities, but should not be conflated with "streets carrying the most traffic".
If snap_tolerance_m > 0, street segments with small digitization gaps or
undershoots within that metric tolerance are snapped and reconciled before calculating
shortest-path flow, avoiding artificial topological breaks.
A walk_betweenness S3 object containing:
edges |
|
summary |
Summary statistics of betweenness across the network. |
top_bottlenecks |
Top street segments with highest betweenness. |
network |
The evaluated |
snap_tolerance_m |
The snapping tolerance used. |
radius_m |
The cutoff radius used. |
if (requireNamespace("igraph", quietly = TRUE)) {
data(streets_cusco)
net <- walk_build_network(streets_cusco, verbose = FALSE)
bw <- walk_betweenness(net)
print(bw)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.