clean_network | R Documentation |
Subdivide edges by adding missing nodes,
(optionally) simplify the network (see simplify_network()
), remove
pseudo-nodes,
and discard all but the main connected component.
clean_network(network, simplify = TRUE)
network |
A network object |
simplify |
Whether the network should be simplified with
|
A cleaned network object
bucharest_osm <- get_osm_example_data()
edges <- dplyr::bind_rows(bucharest_osm$streets,
bucharest_osm$railways)
network <- sfnetworks::as_sfnetwork(edges, directed = FALSE)
clean_network(network)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.