# Get all neighbors of each graph
create_notable('chvatal') %>%
activate(nodes) %>%
mutate(neighborhood = local_members(mindist = 1))
# These are equivalent
create_notable('chvatal') %>%
activate(nodes) %>%
mutate(n_neighbors = local_size(mindist = 1),
degree = centrality_degree()) %>%
as_tibble()
Run the code above in your browser using DataLab