# Get data from the nodes while computing for the edges
create_notable('bull') %>%
activate(nodes) %>%
mutate(centrality = centrality_power()) %>%
activate(edges) %>%
mutate(mean_centrality = (.N()$centrality[from] + .N()$centrality[to])/2)
Run the code above in your browser using DataLab