Generate
Description
Generate nodes and links. Forms a hub and spoke graph with power law distribution.
Usage
make_nodes(
n = 100,
colors = c("#B1E2A3", "#98D3A5", "#328983", "#1C5C70", "#24C96B")
)
make_links(nodes)
make_data(
n = 100,
colors = c("#B1E2A3", "#98D3A5", "#328983", "#1C5C70", "#24C96B")
)
Arguments
Argument | Description |
---|---|
n | Number of nodes. |
colors | Color palette to use. |
nodes | Nodes, as generated by sg_make_nodes . |
Value
tibble
of nodes or links or a list
of the latter.
Examples
graph_data <- make_data()
head(graph_data) # structure
# graph
graph(graph_data)