R/network_describe.R
network_describe.Rd
Returns a data frame that gives a percentage of the group combinations that
best represent the population provided. Uses a person to person query. This
is used internally within network_p2p()
.
network_describe(
data,
hrvar = c("Organization", "LevelDesignation", "FunctionType")
)
Data frame containing a vertex table output from network_p2p()
.
Character vector of length 3 containing the HR attributes to be
used. Defaults to c("Organization", "LevelDesignation", "FunctionType")
.
data frame. A summary table giving the percentage of group combinations that best represent the provided data.
Other Network:
external_network_plot()
,
g2g_data
,
internal_network_plot()
,
network_g2g()
,
network_leiden()
,
network_louvain()
,
network_p2p()
,
network_summary()
,
p2p_data_sim()
# Simulate a P2P edge list
sim_data <- p2p_data_sim()
# Perform Louvain Community Detection and return vertices
lc_df <-
sim_data %>%
network_p2p(
display = "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()
#> Rows: 679
#> Columns: 7
#> $ feature_1 <chr> "TieOrigin_Organization", "TieOrigin_Organization", "T…
#> $ feature_1_value <chr> "Org F", "Org A", "Org C", "Org D", "Org B", "Org E", …
#> $ feature_2 <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ feature_2_value <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ feature_3 <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ feature_3_value <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ Percentage <dbl> 0.22077922, 0.20779221, 0.19480519, 0.11688312, 0.1038…