network_describe: Uncover HR attributes which best represent a population for a...

View source: R/network_describe.R

network_describeR Documentation

Uncover HR attributes which best represent a population for a Person to Person query

Description

[Experimental]

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().

Usage

network_describe(
  data,
  hrvar = c("Organization", "LevelDesignation", "FunctionType")
)

Arguments

data

Data frame containing a vertex table output from network_p2p().

hrvar

Character vector of length 3 containing the HR attributes to be used. Defaults to c("Organization", "LevelDesignation", "FunctionType").

Value

data frame. A summary table giving the percentage of group combinations that best represent the provided data.

Author(s)

Tannaz Sattari Tabrizi Tannaz.Sattari@microsoft.com

See Also

Other Network: external_network_plot(), g2g_data, internal_network_plot(), network_g2g(), network_p2p(), network_summary(), p2p_data_sim()

Examples

# 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()


wpa documentation built on Aug. 21, 2023, 5:11 p.m.