| ox_centrality | R Documentation |
Computes betweenness and/or closeness centrality for every node, using the Rust core (Brandes' algorithm for betweenness; one Dijkstra per node for closeness).
ox_centrality(
g,
type = c("betweenness", "closeness"),
weight = "length",
normalized = TRUE
)
g |
An osm_graph. |
type |
Centrality measures to compute: any of |
weight |
Edge column used as weight. Default |
normalized |
Scale scores for comparability across graphs. Betweenness
is divided by |
A tibble with column osmid plus one column per
requested measure.
g <- example_osm_graph(n = 4)
ox_centrality(g, type = "betweenness")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.