Script gallery
Share powerful scripts to analyze Viva Insights using R, Python, and more

Blog Articles

Identify non-knowledge workers in Python

Non-knowledge workers can be identified by checking whether their average person-level collaboration hours are below a certain threshold. The default threshold is 5 collaboration hours, as adopted her...

0 Comments

Automate download of Flexible Queries in Python and R

We have recently released a new open-source sample code repository called vivainsights-odatadl. This repository provides sample python code to download Microsoft Viva Leader Insights (Workplace Analyt...

0 Comments

Analyse Person-level Metrics in Python

Here is a simple snippet for analysing person-level means for Workplace Analytics metrics using `pandas`.This example is based on running Python via R and the `reticulate` R package, so the data is ac...

1 Comments

Create Time Trend Heatmaps

Create heat mapped horizontal bar plot over time for any metric using the create_trend() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_trend.html

0 Comments

Create Tracking Plot

Create a line chart that tracks metrics over time with a 4-week rolling average by using the create_tracking() function. Check out the documentation on Github: https://microsoft.github.io/wpa/referenc...

0 Comments

Create Stacked Bar Plot

Create a horizontal stacked bar plot for any metric by using the create_stacked() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_stacked.html

0 Comments

Create Scatter Plot

Create a Scatter plot with two selected Workplace Analytics metrics by using the create_scatter() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_scat...

0 Comments

Create Sankey Plot

Create a sankey chart from a two-column count table using the create_sankey() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_sankey.html

0 Comments

Automated Group Exploration with Visualization

Rank all groups across HR attributes on a selected Workplace Analytics metric by using the create_rank() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/crea...

0 Comments

Create Time Comparison Scatter Plots

Create a period comparison scatter plot for any two metrics by using the create_period_scatter() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_perio...

0 Comments

Create Multiple Line Charts

Create a Time Trend - Line Chart for any metric by using the create_line() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_line.html

0 Comments

Create 'Fizzy Drink' Plots

Create a Fizzy Drink / Jittered Scatter Plot for any metric by using the create_fizz() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_fizz.html

0 Comments

Create 100% Stacked Bar Plot

Create a horizontal 100 percent stacked bar plot for any metric by using the create_dist() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_dist.html

0 Comments

Create Bubble Plots

Create a bubble plot with two selected Workplace Analytics metrics, with size representing the number of employees in the group by using the create_bubble() function. Check out the documentation on Gi...

0 Comments

Create Box Plots

Box Plot for any metric by using the create_boxplot() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_boxplot.html

0 Comments

Create Automated Data Validation Report

Generate a Data Validation report in HTML using the validation_report() function. Check out the documentation on Github: Generate a Data Validation report in HTML — validation_report • wpa (microsoft....

0 Comments

Create Bar Charts

Mean Bar Plot for any metric using the create_bar() function. Check out the documentation on Github: https://microsoft.github.io/wpa/reference/create_bar.html

0 Comments

Analyze a Person-to-Person Network

Create an "igraph object" with the p2p query and a corresponding network visualization, with additional features for community detection using the network_p2p() function. Check out the documentation o...

2 Comments

Analyze a Group-to-Group Network

Create an "igraph object" with the g2g query and a corresponding network visualization using the network_g2g() function. Check out the documentation on Github: https://microsoft.github.io/wpa/referenc...

0 Comments

Compute Flexibility Index

Pass an Hourly Collaboration query and compute a Flexibility Index for the entire population. The Flexibility Index is a quantitative measure of the freedom for employees to work at a time of their ch...

0 Comments

Create Working Patterns classification

Apply a rule based algorithm to emails or instant messages sent by hour of day by using the workpatterns_classify() function. Check out the documentation on Github: https://microsoft.github.io/wpa/ref...

0 Comments

Calculate Information Value

Calculate Weight of Evidence (WOE) and Information Value (IV) between multiple predictors and a single outcome variable using the create_IV() function. Check out the documentation on Github: https://m...

0 Comments

Generate a Collaboration Report in HTML

Generate a Collaboration Report in HTML using the collaboration_report() function. Check out the documentation on Github: Generate a Collaboration Report in HTML — collaboration_report • wpa (microsof...

0 Comments
Recommendations for you