top of page
emodiversity site barplot.png

What is Emodiversity?

Emodiversity measures the variety and relative abundance of emotions a person experiences.

 

High emodiversity means experiencing many different emotions in relatively balanced proportions, while low emodiversity means experiencing only a few distinct emotions in unbalanced proportions.

Here,  Person A  and   Person B   have the same average levels of positive emotion (4.2 / 10). However,  Person A 's emotional life is almost 50% more diverse than  Person B 's.  

 

On this page, you'll find an easy-to-use R function to compute emodiversity from any emotion scale.

R Function to Compute Emodiversity

Description

The compute_emodiversity function for R computes emodiversity (Shanon's entropy) for each participant in a dataset.

It accommodates any number of emotion items and supports different rating scales, whether you coded emotion from 1 to 7, 0 to 100, or any other scale.

The function also handles single (one-shot survey) or multiple time points (e.g., ESM or diary data) and missing values.  

Parameters

  • df: The input dataframe.

  • emotion_cols: A vector of column names representing emotion ratings.

  • id_col: The column name representing participant IDs.

  • multiple_times: Boolean indicating if each participant provides multiple sets of emotion ratings (e.g., an experience sampling or diary study in which emotions are measured on multiple occasions). The default is FALSE.

  • absence_code: The value used to code the absence of emotion. By default, the function assumes "not experiencing an emotion" is coded as 0. If you use a 1 (not at all) to 7 (extremely) Likert scale, for example, then specify absence_code = 1.

Details

  • If `absence_code` is `1`, the function will recode the emotion ratings to start from 0.

  • Missing values are replaced with 0 (no emotion).

  • If `multiple_times` is `TRUE`, emotion ratings are averaged for each participant.

  • Emodiversity is calculated using the `diverse` package.

  • Emodiversity is expressed both as a raw score (Shanon's entropy) and as a percentage of the maximum possible emodiversity given the number of items on your emotion scale.

  • The computed emodiversity scores are merged back into the original dataframe.

 

Return Value

A dataframe with added columns for emodiversity, emodiversity percentage, and the number of measurement occasions per participant.

 

R Code

Usage Example Code

Let's create a toy dataframe where 10 participants rated whether they were experiencing 4 distinct emotions on a scale from 1 (not at all) to 7 (extremely) on three separate occasions. Then let's run the compute_emodiversity function. 

Other Tools

Visualizing
Emodiversity

Libby Benson created a handy step-by-step guide for visualizing emodiversity with polar (rose/radar) plots: each “petal” is an emotion, ordered around the circumplex (valence × arousal), with colors showing how often each emotion is felt at different intensity levels (from low to high).

7c0a68_ebbc7924fe3247a89f31a398db2d38ff~mv2.gif

Diversity-type Intraindividual Variability Calculation

A tutorial by Benson and colleagues on computing diversity-type intra-individual variability metrics—like emodiversity—from intensive longitudinal data (daily diaries, EMA/ESM). It also covers related “diversity” constructs (social, activity, stressor diversity).

Screenshot 2025-12-18 at 20.49.25.png

Estimating Emodiversity
From Video

From Mantas Mazeika and colleagues: a GitHub repo with two large-scale video datasets (60,000+ clips) annotated for viewers’ emotional responses and a pre-trained neural networks to model 27 emotions and emodiversity-related patterns from videos.

Screenshot 2025-12-18 at 20.57.42.png
bottom of page