Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/pretty-wolves-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@jspsych/metadata-cli": minor
"@jspsych/metadata": patch
---

Updating metadata-cli to implement Psych-DS validator and small build changes to metadata module
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# DS Store
.DS_Store
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# metadata
Library and CLI tool to generate Psych-DS compliant metadata for jsPsych experiments
# Psych-DS and metadata

## What is Psych-DS and metadata?

Psych-DS is a template data schema to standardize the representation of data files for common Psychology and Cognitive Science experiments. This representation aims to help facilate data sharing by making data more understandable using common structures and metadata files that describe the data. Metadata files describe the data and including relevant information about the types of variables present as well as what each file represents.

## How does it relate to Jspsych?

JsPsych is one software among many to begin implementing this data standard and has many different tools to generate metadata automatically from data files.

# Creating metadata and Psych-DS directories

## How do I create a metadata file and organize my project according to Psych-DS?

There are many different ways to generate metadata. Each tool has it's own pros and cons,

# Developer Roadmap
1 change: 1 addition & 0 deletions dev/jspsych-metadata-generated/CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
For version tracking - if the dataset is updated after being uploaded/shared, changes (with human-readable descriptions) may be recorded here.
2 changes: 2 additions & 0 deletions dev/jspsych-metadata-generated/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# My Project
Human-readable description of the project and dataset.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"success","timeout","failed_images","failed_audio","failed_video","trial_type","trial_index","plugin_version","time_elapsed","rt","stimulus","response","slider_start"
"true","false","[]","[]","[]","preload","0","2.0.0","26","","","",""
"","","","","","html-button-response","1","2.0.0","1200","920","<div style=""max-width:600px;""><p>Some browsers now require the user to interact with a page before it can play audio. Clicking the button below counts as an interaction.</p><p>Be aware of this when planning audio experiments if you want the first trial to include audio.</p></div>","0",""
"","","","","","audio-slider-response","2","2.0.0","3465","-1521640","sound/speech_joke.mp3","6","50"
"","","","","","audio-slider-response","3","2.0.0","5133","-3782974","sound/speech_red.mp3","93","50"
"","","","","","audio-slider-response","4","2.0.0","12999","-5443808","sound/hammer.mp3","100","50"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"rt":null,"correct":false,"stimulus":"<div style=\"margin: auto; width: 200px; height: 200px; background-color: blue;\"></div>","response":null,"trial_type":"categorize-html","trial_index":0,"plugin_version":"2.0.0","time_elapsed":3503}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"success","timeout","failed_images","failed_audio","failed_video","trial_type","trial_index","plugin_version","time_elapsed","rt","stimulus","response"
"true","false","[]","[]","[]","preload","0","2.0.0","11","","",""
"","","","","","image-keyboard-response","1","2.0.0","314","null","img/happy_face_1.jpg","null"
"","","","","","image-keyboard-response","2","2.0.0","617","null","img/happy_face_2.jpg","null"
"","","","","","image-keyboard-response","3","2.0.0","919","null","img/happy_face_3.jpg","null"
"","","","","","image-keyboard-response","4","2.0.0","1221","null","img/happy_face_4.jpg","null"
"","","","","","image-keyboard-response","5","2.0.0","1524","null","img/happy_face_1.jpg","null"
"","","","","","image-keyboard-response","6","2.0.0","1827","null","img/happy_face_2.jpg","null"
"","","","","","image-keyboard-response","7","2.0.0","2129","null","img/happy_face_3.jpg","null"
"","","","","","image-keyboard-response","8","2.0.0","2431","null","img/happy_face_4.jpg","null"
"","","","","","image-keyboard-response","9","2.0.0","2733","null","img/happy_face_1.jpg","null"
"","","","","","image-keyboard-response","10","2.0.0","3036","null","img/happy_face_2.jpg","null"
"","","","","","image-keyboard-response","11","2.0.0","3339","null","img/happy_face_3.jpg","null"
"","","","","","image-keyboard-response","12","2.0.0","3641","null","img/happy_face_4.jpg","null"
"","","","","","image-keyboard-response","13","2.0.0","4989","1346","img/happy_face_1.jpg","y"
"","","","","","image-keyboard-response","14","2.0.0","5435","444","img/happy_face_2.jpg","y"
"","","","","","image-keyboard-response","15","2.0.0","7438","null","img/happy_face_3.jpg","null"
"","","","","","image-keyboard-response","16","2.0.0","7919","478","img/happy_face_4.jpg","y"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"task":"draw","rt":1995,"stimulus":"<div id=\"target\" style=\"width:250px; height: 250px; background-color: #333; margin: auto;\"></div>","response":0,"trial_type":"html-button-response","trial_index":0,"plugin_version":"2.0.0","time_elapsed":1997,"extension_type":["mouse-tracking"],"extension_version":["1.1.0"],"mouse_tracking_data":[{"x":503,"y":272,"t":1364,"event":"mousemove"},{"x":526,"y":285,"t":1367,"event":"mousemove"},{"x":583,"y":315,"t":1380,"event":"mousemove"},{"x":670,"y":362,"t":1397,"event":"mousemove"},{"x":777,"y":417,"t":1414,"event":"mousemove"},{"x":844,"y":457,"t":1430,"event":"mousemove"},{"x":914,"y":501,"t":1447,"event":"mousemove"},{"x":950,"y":525,"t":1464,"event":"mousemove"},{"x":980,"y":547,"t":1480,"event":"mousemove"},{"x":988,"y":557,"t":1497,"event":"mousemove"},{"x":996,"y":566,"t":1514,"event":"mousemove"},{"x":997,"y":569,"t":1530,"event":"mousemove"},{"x":997,"y":570,"t":1547,"event":"mousemove"},{"x":993,"y":573,"t":1564,"event":"mousemove"},{"x":983,"y":577,"t":1580,"event":"mousemove"},{"x":967,"y":580,"t":1597,"event":"mousemove"},{"x":959,"y":583,"t":1614,"event":"mousemove"},{"x":948,"y":587,"t":1630,"event":"mousemove"},{"x":942,"y":590,"t":1647,"event":"mousemove"},{"x":937,"y":592,"t":1664,"event":"mousemove"},{"x":933,"y":594,"t":1680,"event":"mousemove"},{"x":929,"y":595,"t":1697,"event":"mousemove"},{"x":925,"y":595,"t":1714,"event":"mousemove"},{"x":917,"y":595,"t":1730,"event":"mousemove"},{"x":906,"y":594,"t":1747,"event":"mousemove"},{"x":897,"y":593,"t":1764,"event":"mousemove"},{"x":869,"y":593,"t":1780,"event":"mousemove"},{"x":851,"y":593,"t":1797,"event":"mousemove"},{"x":840,"y":593,"t":1814,"event":"mousemove"},{"x":830,"y":593,"t":1830,"event":"mousemove"},{"x":824,"y":593,"t":1847,"event":"mousemove"},{"x":820,"y":593,"t":1864,"event":"mousemove"},{"x":818,"y":593,"t":1881,"event":"mousemove"},{"x":818,"y":593,"t":1897,"event":"mousemove"},{"x":818,"y":593,"t":1914,"event":"mousemove"}],"mouse_tracking_targets":{"#target":{"x":465.984375,"y":170.046875,"width":250,"height":250,"top":170.046875,"right":715.984375,"bottom":420.046875,"left":465.984375}}},{"task":"replay","rt":2363,"stimulus":"<div id=\"target\" style=\"width:250px; height: 250px; background-color: #333; margin: auto; position: relative;\"></div>","response":0,"trial_type":"html-button-response","trial_index":1,"plugin_version":"2.0.0","time_elapsed":4363},{"rt":51279,"stimulus":"<p style=\"margin-bottom:0px;\"><strong>Trial data:</strong></p>\n <pre style=\"margin-top:0px;text-align:left;\">[\n {\n \"task\": \"draw\",\n \"rt\": 1995,\n \"stimulus\": \"<div id=\\\"target\\\" style=\\\"width:250px; height: 250px; background-color: #333; margin: auto;\\\"></div>\",\n \"response\": 0,\n \"trial_type\": \"html-button-response\",\n \"trial_index\": 0,\n \"plugin_version\": \"2.0.0\",\n \"time_elapsed\": 1997,\n \"extension_type\": [\n \"mouse-tracking\"\n ],\n \"extension_version\": [\n \"1.1.0\"\n ],\n \"mouse_tracking_data\": [\n {\n \"x\": 503,\n \"y\": 272,\n \"t\": 1364,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 526,\n \"y\": 285,\n \"t\": 1367,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 583,\n \"y\": 315,\n \"t\": 1380,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 670,\n \"y\": 362,\n \"t\": 1397,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 777,\n \"y\": 417,\n \"t\": 1414,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 844,\n \"y\": 457,\n \"t\": 1430,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 914,\n \"y\": 501,\n \"t\": 1447,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 950,\n \"y\": 525,\n \"t\": 1464,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 980,\n \"y\": 547,\n \"t\": 1480,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 988,\n \"y\": 557,\n \"t\": 1497,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 996,\n \"y\": 566,\n \"t\": 1514,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 997,\n \"y\": 569,\n \"t\": 1530,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 997,\n \"y\": 570,\n \"t\": 1547,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 993,\n \"y\": 573,\n \"t\": 1564,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 983,\n \"y\": 577,\n \"t\": 1580,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 967,\n \"y\": 580,\n \"t\": 1597,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 959,\n \"y\": 583,\n \"t\": 1614,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 948,\n \"y\": 587,\n \"t\": 1630,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 942,\n \"y\": 590,\n \"t\": 1647,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 937,\n \"y\": 592,\n \"t\": 1664,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 933,\n \"y\": 594,\n \"t\": 1680,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 929,\n \"y\": 595,\n \"t\": 1697,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 925,\n \"y\": 595,\n \"t\": 1714,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 917,\n \"y\": 595,\n \"t\": 1730,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 906,\n \"y\": 594,\n \"t\": 1747,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 897,\n \"y\": 593,\n \"t\": 1764,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 869,\n \"y\": 593,\n \"t\": 1780,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 851,\n \"y\": 593,\n \"t\": 1797,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 840,\n \"y\": 593,\n \"t\": 1814,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 830,\n \"y\": 593,\n \"t\": 1830,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 824,\n \"y\": 593,\n \"t\": 1847,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 820,\n \"y\": 593,\n \"t\": 1864,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 818,\n \"y\": 593,\n \"t\": 1881,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 818,\n \"y\": 593,\n \"t\": 1897,\n \"event\": \"mousemove\"\n },\n {\n \"x\": 818,\n \"y\": 593,\n \"t\": 1914,\n \"event\": \"mousemove\"\n }\n ],\n \"mouse_tracking_targets\": {\n \"#target\": {\n \"x\": 465.984375,\n \"y\": 170.046875,\n \"width\": 250,\n \"height\": 250,\n \"top\": 170.046875,\n \"right\": 715.984375,\n \"bottom\": 420.046875,\n \"left\": 465.984375\n }\n }\n }\n]</pre>","response":0,"trial_type":"html-button-response","trial_index":2,"plugin_version":"2.0.0","time_elapsed":55644}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"success","timeout","failed_images","failed_audio","failed_video","trial_type","trial_index","plugin_version","time_elapsed","rt","stimulus","response"
"true","false","[]","[]","[]","preload","0","2.0.0","5","","",""
"","","","","","html-keyboard-response","1","2.0.0","1088","null","<p style='text-align:center; font-size:80px;'>+</p>","null"
"","","","","","image-keyboard-response","2","2.0.0","2739","1398","img/happy_face_2.jpg","y"
"","","","","","html-keyboard-response","3","2.0.0","3494","null","<p style='text-align:center; font-size:80px;'>+</p>","null"
"","","","","","image-keyboard-response","4","2.0.0","4002","255","img/happy_face_3.jpg","n"
"","","","","","html-keyboard-response","5","2.0.0","4756","null","<p style='text-align:center; font-size:80px;'>+</p>","null"
"","","","","","image-keyboard-response","6","2.0.0","5073","64","img/happy_face_1.jpg","y"
"","","","","","html-keyboard-response","7","2.0.0","5828","null","<p style='text-align:center; font-size:80px;'>+</p>","null"
"","","","","","image-keyboard-response","8","2.0.0","6462","381","img/happy_face_2.jpg","n"
"","","","","","html-keyboard-response","9","2.0.0","7217","null","<p style='text-align:center; font-size:80px;'>+</p>","null"
"","","","","","image-keyboard-response","10","2.0.0","7639","168","img/happy_face_3.jpg","y"
"","","","","","html-keyboard-response","11","2.0.0","8393","null","<p style='text-align:center; font-size:80px;'>+</p>","null"
"","","","","","image-keyboard-response","12","2.0.0","8697","50","img/happy_face_1.jpg","n"
Loading