Essentials
Essentials
Essential R and Python scripts for getting started with Viva Insights: utilities, custom visualizations, and custom KPI generation.
Essential Viva Insights Scripts
This page provides some essential scripts to let you get started with analysis in Viva Insights. Using the R and Python scripts below, you can:
- perform exploratory data analysis and identify key interesting hypotheses for your organization
- run a range of custom visualizations on your Viva Insights data
- create custom KPIs or segments using a combination of Viva Insights metrics and organizational / survey data
Show code in:
Remembers your choice on this device.
Utility Scripts
Most of the utility scripts formerly listed here now have their own catalogued entry, with a fuller description, prerequisites, and a direct download link, on the topic page where they’re used:
- Advanced Analytics: top-performer modeling, information value, pairwise chi-square tests, collaboration by time of day, workplace intervention evaluation, meeting engagement drivers
- Network Analysis: group-to-group and person-to-person network customization
- Copilot Analytics: Copilot usage analysis, usage segment trends, difference-in-differences and event-study impact analysis
Visualization Scripts
Creating Essential Visualizations
- Purpose: Generate standard Viva Insights visualizations
- Prerequisites: vivainsights R package, ggplot2
- Key Functions: Bar charts, line plots, network diagrams
- 📥 Download
- Purpose: Generate standard Viva Insights visualizations
- Prerequisites: vivainsights Python package, matplotlib, seaborn
- Key Functions: Bar charts, line plots, network diagrams
- 📥 Download
Custom KPI Generation
Generate Custom KPIs from Viva Insights (R)
- Purpose: Tutorial for creating custom key performance indicators
- Language: R
- Format: Markdown tutorial with code examples
- Prerequisites: vivainsights R package
- 📖 Full tutorial: Generate Custom KPIs in R, a step-by-step walkthrough on this site
- 📥 Download Script
Introductory Notebooks
Introduction to Viva Insights with Python
📁 Introduction to Viva Insights with Python
- Purpose: Comprehensive introduction to Python-based Viva Insights analysis
- Language: Python
- Format: Jupyter Notebooks
- Prerequisites: vivainsights Python package
- Key Topics: Data loading, basic analysis, visualization
Included Notebooks:
- 📓 demo-vivainsights-py.ipynb: General introduction
- 📓 demo-ona-vivainsights-py.ipynb: Organizational Network Analysis
There is no R equivalent notebook yet. R users can start instead from the Getting Started page, which covers the same import and first-analysis steps.
Related pages
- Getting Started: set up your R or Python environment and run your first analysis
- Generate Custom KPIs in R: full walkthrough of the custom-KPI workflow
- Joining People Skills Data: combine People Skills data with Viva Insights metrics
- Advanced Analytics: machine learning, regression, and statistical testing
- Network Analysis: organizational network analysis (ONA)
- Copilot Analytics: measure Microsoft Copilot adoption and impact
- Frontier: turn an export into a finished dashboard or report with a coding agent
Need Help?
- R Package Documentation: vivainsights R
- Python Package Documentation: vivainsights Python
- Common data pitfalls: Data pitfalls reference, for issues like
IsManagerarriving as text or the privacy suppression threshold - Sample Data: Example datasets