Copilot analytics
Copilot Analytics
Analyze Microsoft 365 Copilot usage from Viva Insights: adoption metrics, Power User and Habitual User segmentation, habit-based behavioral models, adoption journey and cohort analysis, usage-segment trends over time, causal impact analysis with difference-in-differences and event-study methods, and ready-to-run report templates for the Consumption query and the GitHub query in R, Python, and Power BI.
Copilot Analytics Scripts
This page contains specialized scripts for analyzing Microsoft Copilot usage data from Viva Insights.
Beyond covering key analyses around Copilot usage volume and breadth (range of actions and applications), these scripts also include a method for measuring Copilot habituality based on behavioral research. This approach determines whether a user can be considered a habitual Copilot user, enabling visualization through user segmentation that identifies Power Users and Habitual Users within an organization. This segmentation provides a framework for continuously tracking Copilot adoption success and measuring the effectiveness of your deployment strategy.
See our DAX Calculated Columns page for detailed instructions on how to identify Copilot Usage Segments using Power BI templates and pre-built DAX formulas.
For more information on the Copilot Usage Segments, see this introduction.
For more inspiration on analyzing Copilot adoption and impact, have a look at our advanced examples playbook.
Advanced Analysis Scripts
Copilot Advanced Analysis
📄 copilot-analytics-examples.R
- Purpose: Comprehensive analysis of Copilot usage patterns and trends
- Prerequisites: vivainsights R package, Copilot usage data
- Key Analysis: Usage segmentation, trend analysis, adoption metrics
- 📥 Download
📄 copilot-analytics-examples.py
- Purpose: Comprehensive analysis of Copilot usage patterns and trends
- Prerequisites: vivainsights Python package, Copilot usage data
- Key Analysis: Usage segmentation, trend analysis, adoption metrics
- 📥 Download
📓 copilot-analytics-examples.ipynb (Jupyter Notebook)
- Purpose: Interactive analysis of Copilot usage with visualizations
- Format: Jupyter Notebook
- Prerequisites: vivainsights Python package, Copilot usage data
- Key Features: Step-by-step analysis, interactive visualizations
- 📥 Download
Copilot Adoption Journey and Ways of Working
Where the scripts above give you a tour of the core Copilot metrics, this notebook is the next step: an end-to-end assessment of how far adoption has travelled and what sustained use is associated with. Reach for it once you have at least 12 weeks of Copilot data and need to answer a leadership question rather than explore the data.
| Start with | When |
|---|---|
| Copilot Advanced Analysis (above) | You are getting oriented, and you want the core metrics, segmentation, and standard visuals. |
| Copilot Adoption Journey (below) | You have 12+ weeks of data and need cohorts, habit formation, conversion targeting, and associated ways of working. |
📓 copilot-adoption-journey-analysis.ipynb (Jupyter Notebook)
- Purpose: End-to-end assessment of Copilot reach, habit formation, conversion opportunity, and associated ways of working
- Format: Jupyter Notebook
- Prerequisites: vivainsights, pandas, NumPy, SciPy, statsmodels, matplotlib, and a Copilot-rich Person Query export with at least 12 weeks of data. Add pyarrow if you are loading a Parquet export
- Key Features: 12-week Power/Habitual/Novice/Low/Non-user segmentation, entry-cohort and function analysis, native Viva Insights scans, adjusted associations, and same-person diagnostics
- Interpretation: Observational associations only. Set
INPUT_FILEto your own export before running; any metric or attribute your query lacks is reported as unavailable and skipped - Related: Copilot Usage Segments for the segment definitions, and Causal Inference when you need an effect rather than an association
- 📥 Download
This example is currently available in Python only. Switch the toggle above to Python to see the notebook details, or use the R scripts in the other sections on this page.
Adoption Tracking & Causal Analysis
The examples in this section focus on measuring Copilot adoption credibly over time. The two causal examples build small, clearly labelled seeded simulations so that the models have something to recover; swap the simulation block for your own export before drawing conclusions.
Copilot Usage Segments Over Time
Sums individual Copilot-action columns, classifies each person-week with identify_usage_segments(version = "12w"), and visualises how the mix of Power, Habitual, Novice, Low, and Non-users evolves week by week.
📄 copilot-usage-segments-trend.Rmd
- Purpose: Track how the mix of Copilot usage segments evolves week by week
- Format: R Markdown
- Prerequisites: vivainsights R package, dplyr, tidyr, ggplot2, scales
- Key Features: identify_usage_segments (12-week rolling), stacked-area segment mix, action trend
- 📥 Download
- 🌐 View HTML Output
📄 copilot-usage-segments-trend.py
- Purpose: Track how the mix of Copilot usage segments evolves week by week
- Prerequisites: vivainsights Python package, pandas, numpy, matplotlib
- Key Features: identify_usage_segments (12-week rolling), stacked-area segment mix, action trend
- 📥 Download
Difference-in-Differences Metric Scan
Runs a within-person DiD per metric across two both-licensed groups (Power vs Low Copilot users) and assembles the effects, confidence intervals, and significance into one sortable table plus a forest plot, honestly surfacing the metrics that do not move.
- Purpose: Run a within-person DiD per metric (Power vs Low Copilot users) into one sortable table
- Format: R Markdown
- Prerequisites: vivainsights R package, fixest, dplyr, tidyr, ggplot2, purrr, scales
- Key Features: Per-metric TWFE DiD, significance stars, forest plot, honest reporting of null effects
- 📥 Download
- 🌐 View HTML Output
- Purpose: Run a within-person DiD per metric (Power vs Low Copilot users) into one sortable table
- Prerequisites: vivainsights Python package, linearmodels, pandas, numpy, matplotlib
- Key Features: Per-metric TWFE DiD, significance stars, forest plot, honest reporting of null effects
- 📥 Download
Event-Study & Difference-in-Differences
Aligns each adopter on their own event time, checks the parallel-trends assumption before trusting a single headline number, and reads the within-person change net of a non-adopting control.
- Purpose: Measure within-person behaviour change around Copilot adoption with a TWFE event-study/DiD
- Format: R Markdown
- Prerequisites: vivainsights R package, fixest, dplyr, tidyr, ggplot2, scales
- Key Features: Event-time alignment, pre-trend check, person + week fixed effects, z-scored composite index
- 📥 Download
- 🌐 View HTML Output
- Purpose: Measure within-person behaviour change around Copilot adoption with a TWFE event-study/DiD
- Prerequisites: vivainsights Python package, linearmodels, pandas, numpy, matplotlib
- Key Features: Event-time alignment, pre-trend check, person + week fixed effects, z-scored composite index
- 📥 Download
Interactive Report Templates
Where the scripts above answer one question at a time, these two templates are complete multi-page HTML reports you can open in a browser and hand to a stakeholder. Both are built with R Markdown and flexdashboard, and both ship with synthetic data so they render end to end before you point them at your own export.
They are built on two of the newer Viva Insights query types, both available from the Customised query tab under Create analysis in the Viva Insights analyst experience. See the AI cost query documentation for the official schema and access details:
| Query | What it adds | Used by |
|---|---|---|
| Consumption query | Copilot credit and token consumption per person and per delegated task type | Copilot Consumption and Ways of Working |
| GitHub query | GitHub Copilot activity, model mix, and language mix for linked developer accounts | Developer Experience and Copilot |
Treat the numbers in the published outputs as illustrative. The simulations are seeded so the charts have something to show, and each report states its assumptions in an appendix.
Copilot Consumption and Ways of Working
Reads the Consumption query alongside a Person Query to separate how much Copilot is consumed from how it is consumed. It covers the concentration of token consumption across users, credit intensity as a cost-mix measure, delegated task types, and the association between consumption and collaboration patterns.
Token consumption is typically right-skewed, so the report leads with a concentration curve and banded percentiles rather than an average that a small number of heavy users can pull upward.
📄 copilot-consumption-ways-of-working-simulation.Rmd
- Purpose: Separate Copilot consumption volume from consumption mix, and relate both to ways of working
- Format: R Markdown (flexdashboard), seven pages
- Prerequisites: vivainsights R package, dplyr, tidyr, ggplot2, scales, flexdashboard, knitr
- Key Features: Concentration curve and percentile bands, credit intensity per 1,000 tokens, delegated task-type mix, usage segments, function drill-down
- Interpretation: Associations only. Credit intensity is a cost-mix measure rather than a measure of value or quality
- 🌐 View the live report
- 📥 Download
This template is currently available in R only. Switch the toggle above to R to see the details, or open the live report directly.
Developer Experience and Copilot
A manager view of developer working conditions and recorded AI use, combining the GitHub query with a Person Query so that GitHub Copilot and Microsoft 365 Copilot are read together rather than in isolation. It establishes a baseline before it looks at change, and it keeps eligibility and coverage visible rather than treating missing activity as zero.
Joint product use is reported with coverage exceptions retained, so a team that simply lacks a licence is never mistaken for a team that has chosen not to adopt.
📄 github-copilot-developer-productivity-simulation.Rmd
- Purpose: Give an engineering manager a baseline of developer working conditions and joint GitHub and M365 Copilot use
- Format: R Markdown (flexdashboard), seven pages
- Prerequisites: vivainsights R package, dplyr, tidyr, ggplot2, scales, flexdashboard, knitr
- Key Features: Team league table, ranked distributions of meeting and uninterrupted hours, joint product-use footprint with coverage exceptions, model and language mix, trends
- Interpretation: Associations only. Acceptance rate is not a measure of code quality, after-hours activity is not a measure of burnout, and calendar space does not establish coding time
- Also required: github-developer-experience-helpers.R and render-github-developer-experience.R
- 🌐 View the live report
- 📥 Download
This template is currently available in R only. Switch the toggle above to R to see the details, or open the live report directly.
📖 Documentation for both templates, covering the expected schema of each query, the simulated data contracts, and how to swap the simulation block for your own export.
Power BI Integration
DAX Calculated Columns
- Purpose: Pre-built DAX formulas for Copilot usage segmentation in Power BI
- Language: DAX
- Format: Individual .dax files
- Prerequisites: Power BI Desktop, Copilot usage data
Available Columns:
12-Week Rolling (RL12W) - Recommended for long-term analysis
- 📄 _Total Copilot actions_RL12W.dax: Average weekly actions over 12 weeks
- 📄 _IsHabit_RL12W.dax: Habit formation indicator (9+ weeks of usage)
- 📄 _CopilotUsageSegment_RL12W.dax: User segmentation (Power/Habitual/Novice/Low/Non-users)
4-Week Rolling (RL4W) - Recommended for short-term/pilot analysis
- 📄 _Total Copilot actions_RL4W.dax: Average weekly actions over 4 weeks
- 📄 _IsHabit_RL4W.dax: Habit formation indicator (4 weeks of usage)
- 📄 _CopilotUsageSegment_RL4W.dax: User segmentation (Power/Habitual/Novice/Low/Non-users)
Usage Segmentation
User Segments Defined
These five segments form a single mutually-exclusive ladder, evaluated top-down so every user falls into exactly one tier (full definitions and decision tree on the Copilot Usage Segments page):
- Power Users: Habitual and averaging 15+ weekly Copilot actions
- Habitual Users: Habitual (9+ of 12 weeks in RL12W, all weeks in RL4W) but averaging < 15 weekly actions
- Novice Users: Not habitual, averaging 1+ weekly Copilot actions
- Low Users: Not habitual, some usage but averaging < 1 weekly action
- Non-users: No Copilot usage in the measurement period
Sample Data
Example Datasets
- 📄 copilot-metrics-taxonomy.csv: Copilot metrics reference
- 📄 viva-insights-org-data-sample.xlsx: Sample organizational data
Analysis Workflow
- Export Copilot Usage Data from Viva Insights
- Choose Your Analysis Method:
- R/Python scripts for detailed analysis
- DAX columns for Power BI dashboards
- Select Time Frame:
- RL12W for long-term habit analysis
- RL4W for pilot programs or short-term analysis
- Run Analysis using the appropriate script
Related pages
- Copilot Usage Segments: how Power, Habitual, and Novice segments are defined
- DAX Calculated Columns: ready-to-use Power BI formulas for segmentation
- Copilot Causal Toolkit: measure the causal impact of Copilot on business outcomes
- Causal Inference in Copilot Analytics: methods for isolating Copilot’s true effect
- Frontier Prompt Library: generate Copilot reports and dashboards with coding agents
- Advanced Analytics: machine learning, regression, and statistical testing
- Network Analysis: organizational network analysis (ONA)
- Essentials: utilities and visualizations to prepare your data
- Getting Started: environment setup and first steps
Need Help?
- Copilot Analytics Documentation: Viva Insights Copilot Guide
- Power BI Integration: DAX Documentation
- Sample Data: Example datasets



