Skip to contents

Overview

snakeplot snakeplot-package
snakeplot: Serpentine Plots for Long Timeline, Sequential and Survey Data

Survey and experience sampling responses

One band per item, or one band per study day for beep-level ratings; responses as ticks, dots or stacked bars.

survey_snake()
Plot survey responses as a serpentine band per item
survey_sequence()
Plot survey responses as a serpentine of stacked bars
sequential_dist()
Plot unipolar survey responses as a serpentine of single-hue stacked bars

Sequences and timelines

Ordered categorical states, several sequences at once, and phases with start and end dates.

sequence_snake()
Plot a long state sequence as blocks along a serpentine path
multi_snake()
Plot many state sequences as a serpentine index or distribution plot
timeline_snake()
Plot a timeline of phases as a serpentine of monthly blocks

Daily activity

Time-stamped events and continuous signals on a daily clock, one band per day.

activity_snake()
Plot daily activity as a serpentine timeline of days
line_snake()
Plot a continuous series as a line through a serpentine of days

Panels

One serpentine plot per group.

facet_snake()
Draw one snake plot per group in a grid of panels

Results

The tables of a drawn plot’s layout.

as.data.frame(<snake_layout>)
Extract the tables of a serpentine plot's layout

Palettes

Diverging and sequential colors, interpolated to the number of levels.

snake_palette()
Get a built-in palette for snake plots
snake_palettes
Built-in color palettes for snake plots

Data

A 14-day experience sampling study of university students.

ema_emotions
Person-level emotion ratings from an experience-sampling study
student_survey
Person-level ratings of emotion, motivation, regulation and engagement
ema_beeps
Prompt-level happiness and anger ratings from an experience-sampling study