Site icon

New R and Python open-source libraries empower analysts to dive deeper into Viva Insights data

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

Introducing the R and Python packages for Viva Insights 


The Viva Insights suite of Power BI templates and custom queries provide opportunities for deeper analysis on workplace collaboration and trends, for analysts who don’t have a coding background. Now, for more technical users, we’re excited to announce new complementary tools that will add even more details, visualizations, and efficient workflows to these types of analyses.  


The Viva Insights R package and the Viva Insights Python package are open-source repositories of functions that enable analysts to build visualizations and advanced analyses on top of existing queries. Armed with either of these packages, analysts can perform: 


Plots like the following that show how workplace metrics trend across different factors can be generated with a single line of code using the Person Query: 


Why use R or Python to analyze data from Viva Insights? 


A typical analysis cycle may involve the analyst developing a set of hypotheses and key observations quickly with the turnkey Power BI templates and moving on to either the R or the Python packages to validate and further explore the early findings.  


As two of the most popular tools used in data science, analysts can easily use R and Python to boost their productivity and the quality of their work. For example, they can: 



Aside from enabling analysts to take their analyses with Viva Insights further, code-based tools like R and Python also encourage best practices around reproducibility. What this means is that manual steps such as copy-paste, point-click or drag-drop operations – which can be prone to errors and can be time-consuming - are minimized. This is particularly important for complex and long-term analyses.  



Save time and produce better analyses with R and Python packages 


Previously, to achieve the above, analysts had to write analysis code from scratch. Now, the R and Python packages will save analysts a significant amount of time by providing the functions to perform the most frequently used analyses.  


Moreover, the functions in the R and Python packages incorporate the following best practices for analyzing Viva Insights data:  


Both libraries come with functions to identify outliers and anomalies in Viva Insights data, as shown below. 


Organization Network Analysis (ONA) 


In the last month, the following cross-collaboration queries have become available: 


In the latest releases, both the R (v0.4.1) and Python packages (v0.2.0) come with the features that allow analysts to perform organizational network analysis (ONA) with these cross-collaboration queries, which provides a network-lens view into organizations. This type of analysis can surface unique insights into both problem spots as well as opportunities for business leaders. 


ONA, for instance, can help analysts: 


Both libraries offer community detection features that can be deployed for scenarios such as workspace planning or identifying areas of the organization that are at risk of becoming siloed.  


Using the packages, analysts can create and visualize communities on top of the person-to-person cross-collaboration query, as shown below.  


How do I get started? 


To make use of the R or Python packages, the Analyst role must be assigned and you must be able to create and download queries from the Analyst’s experience. Both packages operate on top of the .csv files downloaded from Viva Insights.  


For detailed instructions on installation and usage examples, please visit the links below for more information.  




Intro documentation 

Intro documentation 

Full code documentation 

Full code documentation 

Submit requests or issues 

Submit requests or issues 

Source code 

Source code 

CRAN distribution 

PyPi distribution 


What’s coming next? 


In the coming months, our collaborators will be working on creating more dynamic report templates within the packages, and introducing functionalies designed for analyzing survey data from Glint. We will also be working on publishing more examples to make it easier for analysts to run and customize the analyses.  


As these are open-source projects, we welcome and rely on feature requests, bug reports, and code contributions for our users. If you’re interested in getting involved (or wish to find out how), please email or submit an Issue on either the R or the Python Issues page. 


See here for a full list of contributors to our libraries: 

Exit mobile version