Sample a random but connected sub-component of a graph
dodgr_sample(graph, nverts = 1000)
A flat table of graph edges. Must contain columns labelled
Number of vertices to sample
A connected sub-component of
Graphs may occasionally have
nverts + 1 vertices, rather than
1 2 3 4 5
graph <- weight_streetnet (hampi) nrow (graph) # 5,742 graph <- dodgr_sample (graph, nverts = 200) nrow (graph) # generally around 400 edges nrow (dodgr_vertices (graph)) # 200
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.