Reference - Functions

This documentation provides a comprehensive reference for all vivainsights functions, organized by category. Click any module name to view its full documentation.

Visualization Functions

Core Visualization

vivainsights.create_bar

Calculate and visualize the mean of a metric by organizational group.

vivainsights.create_boxplot

Create boxplot visualizations of metric distributions by organizational group.

vivainsights.create_bubble

Create a bubble chart visualization of two metrics by organizational group.

vivainsights.create_line

Visualize the average of a metric by sub-population over time as a line chart.

vivainsights.create_rank

Rank all groups across HR attributes for a selected Viva Insights metric.

vivainsights.create_trend

Create a week-by-week heatmap of a selected Viva Insights metric.

Specialized Visualizations

vivainsights.create_sankey

Create a Sankey chart from a two-column count table.

vivainsights.create_lorenz

Calculate the Gini coefficient and plot the Lorenz curve for a given metric.

vivainsights.create_inc

Analyze the proportion of a population above or below a metric threshold.

vivainsights.create_bar_asis

Create a bar chart with customizable options and no pre-aggregation.

Advanced Analytics Visualizations

vivainsights.create_IV

Calculate Information Value (IV) and Weight of Evidence (WOE) for predictors.

vivainsights.create_odds_ratios

Calculate odds ratios for ordinal metrics against a specified outcome.

Data Analysis & Identification

Employee Behavior Analysis

vivainsights.identify_churn

Identify and count employees who have churned from or joined the dataset.

vivainsights.identify_tenure

Calculate and summarize employee tenure based on hire and metric dates.

vivainsights.identify_habit

Identify recurring behavioral habits from Viva Insights metrics.

vivainsights.identify_usage_segments

Segment employees into usage-based groups from collaboration metrics.

Data Quality & Anomaly Detection

vivainsights.identify_outlier

Identify outlier weeks using z-scores for a selected metric.

vivainsights.identify_inactiveweeks

Identify weeks where collaboration hours fall far below the mean.

vivainsights.identify_holidayweeks

Detect holiday weeks by scanning for anomalous collaboration hours.

vivainsights.identify_nkw

Identify non-knowledge workers based on collaboration activity thresholds.

Time & Date Analysis

vivainsights.identify_daterange

Identify whether a date column has daily, weekly, or monthly frequency.

vivainsights.extract_date_range

Extract the minimum and maximum date range from a dataset.

Network Analysis

vivainsights.network_g2g

Create a network plot from a group-to-group query.

vivainsights.network_p2p

Perform person-to-person network analysis and visualization.

vivainsights.network_summary

Summarize node centrality statistics from an igraph network object.

Data Management

Sample Data Sources

vivainsights.pq_data

Load a sample person query dataset.

vivainsights.mt_data

Load a sample meeting query dataset.

vivainsights.g2g_data

Load a sample group-to-group query dataset.

vivainsights.p2p_data

Load a sample person-to-person query dataset.

vivainsights.p2g_data

Load a sample person-to-group query dataset.

vivainsights.p2p_data_sim

Simulate a person-to-person network using the Watts-Strogatz model.

Data Import & Export

vivainsights.import_query

Import a Viva Insights query from a CSV file with optimized variable types.

vivainsights.export

Display and export data frames and plot objects to various formats.

Utility Functions

Data Processing

vivainsights.extract_hr

Extract HR or organizational attribute columns from a Viva Insights dataset.

vivainsights.hrvar_count

Count the number of distinct persons by organizational group.

vivainsights.totals_col

Add a totals column with a specified value to a DataFrame.

vivainsights.us_to_space

Replace underscores with spaces in a given string.

Validation & Configuration

vivainsights.check_inputs

Validate that required variables exist in a DataFrame.

vivainsights.color_codes

Define color palettes and an Enum class for standard vivainsights colors.

Advanced Analytics

vivainsights.xicor

Calculate the Chatterjee (xi) correlation coefficient for a given metric.

vivainsights.keymetrics_scan

Generate a heatmap or summary table scanning key Viva Insights metrics.