| walk_scenario_betweenness | R Documentation |
Simulates the pedestrianization or physical closure of selected street segments and calculates the redistribution of shortest-path betweenness centrality across the remaining network.
walk_scenario_betweenness(
network,
closed_edges = NULL,
snap_tolerance_m = 0,
radius_m = NULL,
verbose = TRUE
)
network |
A |
closed_edges |
Integer vector of edge row indices to remove. |
snap_tolerance_m |
Snapping tolerance in meters for network repair. Default is 0.0. |
radius_m |
Optional metric search cutoff in meters. |
verbose |
Logical. |
A walk_scenario_betweenness S3 object containing comparison metrics,
augmented edges with delta betweenness, and top diverted streets.
if (requireNamespace("igraph", quietly = TRUE)) {
data(streets_cusco)
net <- walk_build_network(streets_cusco, verbose = FALSE)
sim <- walk_scenario_betweenness(net, closed_edges = c(5, 10))
print(sim)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.