Public
Edited
Mar 22, 2023
Paused
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
rawData = s3DataFile.csv({ typed: true })
Insert cell
sbjID = demo.filter(x => x.Email == email)[0].SbjID
Insert cell
demo = rawData
.filter((x) => x.trial_type == "survey-html-form")
.map((x) => {
const r = JSON.parse(x.response);
return {
SbjID: x.SbjID,
Email: r.Email,
Age: r.Age,
Gender: r.Gender,
Handedness: r.Handedness,
Birder: r.Birder,
Braille: r.Braille,
RT: x.rt
};
})
Insert cell
switchData = rawData.filter(
(x) => (x.Task == "aOddball-Switches") & x.TestTrial
).filter((x) => x.SbjID == sbjID)
Insert cell
switchSummary = {
const corrData = switchData.map((x) => x.Corr);
return {
Acc: d3.sum(corrData) / corrData.length,
MeanRT: d3.mean(switchData.map((x) => x.rt))
};
}
Insert cell
laughData = rawData
.filter((x) => (x.Task == "a2Match-Laughs") & x.TestTrial)
.filter((x) => x.SbjID == sbjID)
Insert cell
laughSummary = {
const corrData = laughData.map((x) => x.Correct);
return {
Acc: d3.sum(corrData) / corrData.length,
MeanRT: d3.mean(laughData.map((x) => x.rt))
};
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more