Description Usage Arguments Details Value Examples
Create network from webhoser data.
1 |
data |
The data, as returned by wh_collect. |
from, to |
Columns to build network. |
callback |
Callback to apply to edges, a data.frame with columns
|
The returned nodes and edges form an undirected graph.
A list
of length 2 containing data.frame
s:
nodes
: Name of entity
and n
umber of occurences.
edges
: The source
, target
, and n
umber of edges.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | data("webhoser")
# co-mentions
graph <- webhoser %>%
net_con(entities.persons)
# unpack
c(nodes, edges) %<-% graph
# visualise
webhoser %>%
net_con(entities.persons, entities.locations) %>%
net_vis()
# callback
cb <- function(x){
dplyr::filter(x, n > 3)
}
webhoser %>%
net_con(
entities.persons,
entities.locations,
callback = cb
) %>%
net_vis()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.