Learn R Programming

⚠️There's a newer version (1.9.0) of this package.Take me there.

wpa

Analyze and Visualize Workplace Analytics data

This is an R package for analyzing and visualizing data from Microsoft Workplace Analytics.

With the wpa package, you can...

  1. Run prebuilt analysis and visualizations off Workplace Analytics data with settings for HR variables, privacy threshold, etc.

  2. Generate prebuilt interactive HTML reports, which cover specific areas e.g. collaboration, connectivity

  3. Leverage advanced analytics functions, such as text mining and hierarchical clustering, which are built for Workplace Analytics metrics

  4. Integrate analysis of Workplace Analytics data with your R workflow seamlessly

Here is an example of wpa in action:


:rocket: Users

To get started with the package, please see the following links:

Also check out our package cheat sheet for a quick glimpse of what wpa offers:


:hammer: Developers

We welcome contributions to the package!

Contributing code

If you would like contribute code to the repo, please read our Contributor Guide and Developer Guide. This documentation should provide you all the information you will need to get started.

Issues or Feature Requests

If you would like to log an issue or submit a feature request, please create a new issue or comment on an existing issue on GitHub Issues on this repo.

Reporting Security Issues

Please do not report security vulnerabilities through public GitHub issues. Please read our Security document for more details.

Changelog

See NEWS.md for the package changelog.


Code of Conduct

We would ask you to please read the Microsoft Open Source Code of Conduct prior to engaging with this package.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.


Finding this project useful?

:star: Please star this repository to keep us going!

Contributors to the GitHub repo:

See the full list of our contributors here.

Copy Link

Version

Install

install.packages('wpa')

Monthly Downloads

1,444

Version

1.4.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Martin Chan

Last Published

April 6th, 2021

Functions in wpa (1.4.3)

afterhours_summary

Summary of After-Hours Collaboration Hours
afterhours_line

After-hours Collaboration Time Trend - Line Chart
IV_by_period

Identify the WPA metrics that have the biggest change between two periods.
IV_report

Generate a Information Value HTML Report
calculate_IV

Calculate Weight of Evidence (WOE) and Information Value (IV) between a single predictor and a single outcome variable.
camel_clean

Convert "CamelCase" to "Camel Case"
afterhours_rank

Rank groups with high After-Hours Collaboration Hours
afterhours_trend

After-Hours Time Trend
afterhours_dist

Distribution of After-hours Collaboration Hours as a 100% stacked bar
afterhours_fizz

Distribution of After-hours Collaboration Hours (Fizzy Drink plot)
collaboration_dist

Distribution of Collaboration Hours as a 100% stacked bar
collaboration_area

Collaboration - Stacked Area Plot
coaching_report

Generate a Coaching report in HTML
check_query

Check a query to ensure that it is suitable for analysis
collaboration_report

Generate a Collaboration Report in HTML
collaboration_rank

Collaboration Ranking
collaboration_fizz

Distribution of Collaboration Hours (Fizzy Drink plot)
create_boxplot

Box Plot for any metric
create_bar_asis

Create a bar chart without aggregation for any metric
capacity_report

Generate a Capacity report in HTML
collaboration_sum

Collaboration Summary
create_period_scatter

Period comparison scatter plot for any two metrics
create_line_asis

Create a line chart without aggregation for any metric
create_IV

Calculate Information Value for a selected outcome variable
create_hist

Create a histogram plot for any metric
create_line

Time Trend - Line Chart for any metric
create_bar

Mean Bar Plot for any metric
email_fizz

Distribution of Email Hours (Fizzy Drink plot)
connectivity_report

Generate a Connectivity report in HTML
check_inputs

Check whether a data frame contains all the required variable
copy_df

Copy a data frame to clipboard for pasting in Excel
email_line

Email Time Trend - Line Chart
dv_data

Sample Standard Person Query dataset for Data Validation
cut_hour

Convert a numeric variable for hours into categorical
create_rank

Rank all groups across HR attributes on a selected Workplace Analytics metric
create_rank_combine

Create combination pairs of HR variables and run 'create_rank()'
create_bubble

Create a bubble plot with two selected Workplace Analytics metrics (General Purpose), with size representing the number of employees in the group.
combine_signals

Combine signals from the Hourly Collaboration query
em_data

Sample Hourly Collaboration data with Email and IMs
comma

Add comma separator for thousands
collaboration_line

Collaboration Time Trend - Line Chart
create_dist

Horizontal 100 percent stacked bar plot for any metric
email_dist

Distribution of Email Hours as a 100% stacked bar
email_trend

Email Hours Time Trend
export

Export 'wpa' outputs to CSV, clipboard, or save as images
extract_hr

Extract HR attribute variables
collaboration_trend

Collaboration Time Trend
identify_churn

Identify employees who have churned from the dataset
extract_date_range

Extract date period
identify_outlier

Identify metric outliers over a date interval
external_network_plot

Plot External Network Breadth and Size as a scatter plot
identify_shifts_wp

Identify shifts based on binary activity
identify_tenure

Tenure calculation based on different input dates, returns data summary table or histogram
identify_holidayweeks

Identify Holiday Weeks based on outliers
hrvar_count_all

Create count of distinct fields and percentage of employees with missing values for all HR variables
import_wpa

Import a Workplace Analytics Query
create_trend

Heat mapped horizontal bar plot over time for any metric
hrvar_count

Create a count of distinct people in a specified HR variable
create_stacked

Horizontal stacked bar plot for any metric
keymetrics_scan

Run a summary of Key Metrics from the Standard Person Query data
import_to_fst

Read a Workplace Analytics query in '.csv' using and create a '.fst' file in the same directory for faster reading
map_IV

Calculate Weight of Evidence (WOE) and Information Value (IV) between multiple predictors and a single outcome variable, returning a list of statistics.
flag_ch_ratio

Flag unusual high collaboration hours to after-hours collaboration hours ratio
g2g_data

Sample Group-to-Group dataset
flex_index

Compute a Flexibility Index based on the Hourly Collaboration Query
email_summary

Email Summary
create_fizz

Fizzy Drink / Jittered Scatter Plot for any metric
identify_inactiveweeks

Identify Inactive Weeks
email_rank

Email Hours Ranking
flag_outlooktime

Flag unusual outlook time settings for work day start and end time
generate_report

Generate HTML report with list inputs
create_dt

Create interactive tables in HTML with 'download' buttons.
identify_nkw

Identify Non-Knowledge workers in a Person Query using Collaboration Hours
meeting_line

Meeting Time Trend - Line Chart
create_sankey

Create a sankey chart from a two-column count table
meetingtype_dist_mt

Meeting Type Distribution (Meeting Query)
meetingtype_dist_ca

Meeting Type Distribution (Ways of Working Assessment Query)
flag_extreme

Warn if a certain metric exceeds an arbitrary threshold
heat_colours

Generate a vector of n contiguous colours, as a red-yellow-green palette.
flag_em_ratio

Flag Persons with unusually high Email Hours to Emails Sent ratio
maxmin

Max-Min Scaling Function
hr_trend

Employee count over time
create_scatter

Create a Scatter plot with two selected Workplace Analytics metrics (General Purpose)
meeting_extract

Extract top low-engagement meetings from the Meeting Query
identify_privacythreshold

Identify groups under privacy threshold
one2one_fizz

Distribution of Manager 1:1 Time (Fizzy Drink plot)
one2one_freq

Frequency of Manager 1:1 Meetings as bar or 100% stacked bar chart
identify_query

Identify the query type of the passed data frame
meeting_skim

Produce a skim summary of meeting hours
network_describe

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

Run a meeting habits / meeting quality analysis
meeting_rank

Meeting Hours Ranking
workloads_rank

Rank all groups across HR attributes for Work Week Span
sq_data

Sample Standard Person Query dataset
tm_freq

Perform a Word or Ngram Frequency Analysis and return a Circular Bar Plot
tm_cooc

Analyse word co-occurrence in subject lines and return a network plot
rgb2hex

Convert rgb to HEX code
meeting_fizz

Distribution of Meeting Hours (Fizzy Drink plot)
network_g2g

Create a network plot with the group-to-group query
mgrcoatt_dist

Manager meeting coattendance distribution
network_louvain

Implement the Louvain community detection on a Person to Person network query
network_leiden

Implement the Leiden community detection on a Person to Person network query
meetingtype_summary

Create a summary bar chart of the proportion of Meeting Hours spent in Long or Large Meetings
identify_shifts

Identify shifts based on outlook time settings for work day start and end time
workloads_fizz

Distribution of Work Week Span (Fizzy Drink plot)
workloads_dist

Distribution of Work Week Span as a 100% stacked bar
internal_network_plot

Plot Internal Network Breadth and Size as a scatter plot
mgrrel_matrix

Manager Relationship 2x2 Matrix
is_date_format

Identify whether string is a date format
period_change

Plot the distribution of percentage change between periods of a WpA metric by the number of employees.
pairwise_count

Perform a pairwise count of words by id
standardise_pq

Standardise variable names to a Standard Person Query
workloads_line

Workloads Time Trend - Line Chart
meeting_dist

Distribution of Meeting Hours as a 100% stacked bar
meeting_trend

Meeting Hours Time Trend
meetingtype_dist

Distribution of Meeting Types by number of Attendees and Duration
one2one_line

Manager 1:1 Time Trend - Line Chart
meeting_summary

Meeting Summary
meeting_tm_report

Generate a Meeting Text Mining report in HTML
subject_validate

Scan meeting subject and highlight items for review
plot_WOE

Plot WOE graphs with an IV object
us_to_space

Replace underscore with space
plot_flex_index

Plot a Sample of Working Patterns using Flexibility Index output
one2one_rank

Manager 1:1 Time Ranking
validation_report

Generate a Data Validation report in HTML
totals_bind

Row-bind an identical data frame for computing grouped totals
tm_wordcloud

Generate a wordcloud with meeting subject lines
one2one_sum

Manager 1:1 Time Summary
read_preamble

Read preamble
one2one_trend

Manager 1:1 Time Trend
remove_outliers

Remove outliers from a person query across time
tm_clean

Clean subject line text prior to analysis
theme_wpa_basic

Basic theme for 'wpa' visualisations
workloads_summary

Work Week Span Summary
workloads_trend

Work Week Span Time Trend
network_p2p

Create a network plot with the person-to-person query
personas_hclust

Create hierarchical clusters of selected metrics using a Person query
tstamp

Generate a time stamp
theme_wpa

Main theme for 'wpa' visualisations
one2one_dist

Distribution of Manager 1:1 Time as a 100% stacked bar
track_HR_change

Sankey chart of organizational movement between HR attributes and missing values (outside company move) (Data Overview)
subject_validate_report

Generate Meeting Text Mining report in HTML for Common Exclusion Terms
%>%

Pipe operator
workpatterns_area

Create an area plot of emails and IMs by hour of the day
workpatterns_classify_bw

Classify working pattern week archetypes using a rule-based algorithm, using the binary week-based ('bw') method.
workpatterns_classify_pav

Classify working pattern personas using a rule based algorithm, using the person-average volume-based ('pav') method.
workpatterns_classify

Classify working pattern personas using a rule based algorithm
workpatterns_rank

Create a rank table of working patterns
workpatterns_hclust

Create a hierarchical clustering of email or IMs by hour of day
workpatterns_report

Generate a report on working patterns in HTML
p2p_data_sim

Simulate a person-to-person query using a Watts-Strogatz model
totals_reorder

Reorder a value to the top of the summary table
p_test

Calculate the p-value of the null hypothesis that two outcomes are from the same dataset
mt_data

Sample Meeting Query dataset
wrap

Add a character at the start and end of a character string
totals_col

Fabricate a 'Total' HR variable