Forum Discussion

VI_Migration's avatar
VI_Migration
Silver Contributor
Oct 21, 2021
Solved

Using Python Scripts to analyse WpA Data

Hi there, starting this conversation to discuss with devs how they experiencing using Python to analyse WpA data. So far, do we have any API or solution instead of using R libraries through Python scripts?

  • Hi VI_Migration - currently, the https://microsoft.github.io/wpa/ R library is the most comprehensive open-source and community solution for analysing Workplace Analytics data. Most, though not all, of its functionalities can however be replicated by Python libraries like pandas, numpy, ggplot / plotnine (close cousin of dplyr and ggplot2 in R) - see this very simple example https://community.vivainsights.microsoft.com/t5/Script-gallery/Analyse-Person-level-Metrics-in-Python/ba-p/565.  However, a Python version of the wpa R library does not currently (yet) exist. We have in the past suggested users to use rpy2 to access the wpa R functionalities, but have a mixture of reactions including: 

    1. Would prefer to switch to R instead for analysis, instead of using rpy2
    2. Would prefer to wait till a Python library is available 
    3. Will write Python scripts from scratch for custom analysis

    It will actually be helpful to get a gauge of what analysts prefer here - what would your preference/ use case be? 

2 Replies

  • VI_Migration's avatar
    VI_Migration
    Silver Contributor

    Hi VI_Migration - currently, the https://microsoft.github.io/wpa/ R library is the most comprehensive open-source and community solution for analysing Workplace Analytics data. Most, though not all, of its functionalities can however be replicated by Python libraries like pandas, numpy, ggplot / plotnine (close cousin of dplyr and ggplot2 in R) - see this very simple example https://community.vivainsights.microsoft.com/t5/Script-gallery/Analyse-Person-level-Metrics-in-Python/ba-p/565.  However, a Python version of the wpa R library does not currently (yet) exist. We have in the past suggested users to use rpy2 to access the wpa R functionalities, but have a mixture of reactions including: 

    1. Would prefer to switch to R instead for analysis, instead of using rpy2
    2. Would prefer to wait till a Python library is available 
    3. Will write Python scripts from scratch for custom analysis

    It will actually be helpful to get a gauge of what analysts prefer here - what would your preference/ use case be? 

Resources