This section describes the use of summary functions. These functions allow you to compare averages across the groups defined by an organizational attribute, for many Workplace Analytics metrics.
keymetrics_scan() function allows you to produce a summary table with a wide range of metrics from an Standard Person Query. Just like in the function we studied in the previous section, you can specify which HR attribute/variable to use as a grouping variable with the
hrvar argument, and what output to obtain (either “plot” or “table”) with the
sq_data %>% keymetrics_scan(hrvar = "Organization", return = "plot") sq_data %>% keymetrics_scan(hrvar = "Organization", return = "table")
The resulting table, will provide a averages for 18 key Workplace Analytics Metrics. You can customised what specific indicators to include, with the
keymetrics_scan() function is a great starting point for exploratory data analysis, before you dive deeper into particular metrics.
collaboration_summary() function generates a stacked bar plot summarising the email and meeting hours by an HR attribute you specify. If no HR attribute is specified, “organization” will be used by default:
sq_data %>% collaboration_summary()
By changing the
hrvar() argument, you can change the groups being shown easily:
sq_data %>% collaboration_summary(hrvar = "LevelDesignation")
By default, all summary functions exclude groups with less that five individuals. This is also something that can be adjusted, using the
sq_data %>% collaboration_summary(hrvar = "LevelDesignation", mingroup = 10)
Finally, you can also use “table” in the
return argument, to obtain summary table instead of a plot. The
export() function will copy all contents to the clipboard.
sq_data %>% collaboration_summary(hrvar = "LevelDesignation", return = "table")
The package includes a wide range of summary functions, that create bar plots for specific metrics. These include:
email_summary(): Bar plot summarising email hours by an HR attribute.
meeting_summary(): Bar plot summarising meeting hours by an HR attribute.
one2one_summary(): Bar plot summarising manager one-to-one meeting hours, by an HR attribute.
workloads_summary(): Bar plot summarising workweek span by an HR attribute.
afterhours_summary(): Bar plot summarising after-hours collaboration hours by an HR attribute.
All of these functions work equivalently to the
collaboration_summary() function: they use Standard Person Query data as an input, and accept
sq_data %>% afterhours_summary()
For other metrics, the
create_bar() function is a good way to obtain a summary bar chart for any metric. This function requires you to include a character string containing the name of the metric you want to analyze, e.g. “Generated_workload_email_hours”:
sq_data %>% create_bar(metric = "Generated_workload_email_hours")
create_bar() function also accepts
sq_data %>% collaboration_summary() + ggtitle("This is a custom title")
Let’s continue to Distribution Functions to explore how we can analyse distributions from different Workplace Analytics Metrics with unique functions.