# Simulate a P2P edge list
sim_data <- p2p_data_sim()
# Perform Louvain Community Detection and return vertices
lc_df <-
sim_data %>%
network_p2p(
community = "louvain",
return = "data"
)
# Join org data from input edge list
joined_df <-
lc_df %>%
dplyr::left_join(
sim_data %>%
dplyr::select(TieOrigin_PersonId,
TieOrigin_Organization,
TieOrigin_LevelDesignation,
TieOrigin_City),
by = c("name" = "TieOrigin_PersonId"))
# Describe cluster 2
joined_df %>%
# dplyr::filter(cluster == "2") %>%
network_describe(
hrvar = c(
"Organization",
"LevelDesignation",
"City"
)
) %>%
dplyr::glimpse()
Run the code above in your browser using DataLab