Viva Insights Sample Code
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
Utility Scripts
R Utilities
Essential functions and utilities for R-based analysis.
- Purpose: Collection of utility functions for common Viva Insights analysis tasks
- Language: R
- Format: Multiple R files
- Prerequisites: vivainsights R package
Python Utilities
Essential functions and utilities for Python-based analysis.
- Purpose: Collection of utility functions for common Viva Insights analysis tasks
- Language: Python
- Format: Multiple Python files
- Prerequisites: vivainsights Python package
Visualization Scripts
Creating Essential Visualizations (R)
- Purpose: Generate standard Viva Insights visualizations
- Language: R
- Prerequisites: vivainsights R package, ggplot2
- Key Functions: Bar charts, line plots, network diagrams
- 📥 Download
Creating Essential Visualizations (Python)
- Purpose: Generate standard Viva Insights visualizations
- Language: Python
- 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 — step-by-step walkthrough on this site
- 📥 Download Script
Getting Started Tutorials
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
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)
Need Help?
- R Package Documentation: vivainsights R
- Python Package Documentation: vivainsights Python
- Sample Data: Example datasets