Skip to main content
Version: v2.0.0-rc3

Data Export and Basic Analysis

reVISit allows you to export in Tidy format for analysis in Python notebooks or R.

Steps to Download Data

  1. Navigate to the Analysis platform for the current study.

  2. Open the Table View, then click on the Download all participants' data as a tidy CSV button. Here's a direct link for the example below.

Tidy export

  1. The CSV Explorer will open, where you can select the columns to export. A preview of the first five rows of the output CSV will be displayed.

  2. Once ready, click the Download button at the bottom right.

Tidy export

After downloading the Tidy data, you can import it into your favorite analysis platform for further analysis. Below is an example of how to work with exported data from the Interactive Selections in Scatterplots study in R.

Example Workflow in R

1. Install Necessary Packages

list.of.packages <- c("ggplot2", "Hmisc")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)

library(ggplot2)

2. Read and Preview the Data

df <- read.csv("data/example-brush-interactions_all_tidy.csv")
head(df)
participantIdtrialIdtrialOrderresponseId
1017ab8bd-33d1-4f95-ac07-5fedef30928aintroduction0prolificId
2017ab8bd-33d1-4f95-ac07-5fedef30928aconsent1signature
3017ab8bd-33d1-4f95-ac07-5fedef30928aconsent1accept
4017ab8bd-33d1-4f95-ac07-5fedef30928apaintBrush_q15response
5017ab8bd-33d1-4f95-ac07-5fedef30928apaintBrush_q26max-response

3. Filter Data for Task q2

q2 <- subset(df, grepl("_q2", trialId) & status == "completed")
q2$isCorrect <- ifelse(q2$answer == q2$correctAnswer, 1, 0)
q2 <- subset(df, grepl("_q2", trialId) & status == "completed")
q2$isCorrect <- ifelse(q2$answer == q2$correctAnswer, 1, 0)

4. Create a Violin Plot

The plot displays correct answers on the right and incorrect answers on the left.

ggplot(q2, aes(x = isCorrect, y = trialId)) +
geom_violin(aes(fill = trialId), color = "#888", alpha = 0.7) +
stat_summary(fun.data = "mean_cl_boot", colour = "#333", size = 0.5, alpha=0.5) +
theme_minimal() +
theme(legend.position = "none") +
labs(
title = "Violin Plot for q2 (Finding most/least value)",
)

Violin Plot

We find accuracy using paint brush technique is much less than that of the others.

5. Export the generated plot.

ggsave("plot.pdf", width = 5, height = 2, units = "in")