Format of the CSV file
The method described on this page presupposes that your CSV spreadsheet has one of the two general formats below.
Example
Sentence | PictureLeft | PictureRight |
---|---|---|
The dog is tall | bigdog.png | highdog.png |
The cat is big | tallcat.png | highcat.png |
Example of a group design
With the table below, each participant will only see trials corresponding to either the A or the B rows.
Group | Sentence | PictureLeft | PictureRight |
---|---|---|---|
A | The dog is tall | bigdog.png | highdog.png |
B | The dog is big | talldog.png | highdog.png |
B | The cat is tall | bigcat.png | highcat.png |
A | The cat is big | tallcat.png | highcat.png |
Create the IBEX items
Upload your CSV file under chunk_includes in your Ibex project and use the command PennController.Template
to generate trials from your spreadsheet.
If your spreadsheet file contains a Label column, the generated items will be labeled accordingly (unless explicitly labeled otherwise). If the file contains no column named so and no explicit label is given to the items, they will be labeled Item-N, where N is a number.
[js try=”data”]
PennController.Template(
row => PennController(
defaultImage
.settings.size(80, 80)
,
newText( “sentence” , row.Sentence )
.print()
,
newCanvas( “images” , 200 , 100 )
.settings.add( 10 , 10 , newImage(“leftImage”, row.PictureLeft) )
.settings.add( 110 , 10 , newImage(“rightImage”, row.PictureRight) )
.print()
,
newSelector( “choice” )
.settings.add( getImage(“leftImage”) , getImage(“rightImage”) )
.settings.log()
.wait()
)
);
[/js]
See the tutorial page for more.
Index
- Installing PennController
- Ontology
- Aesthetics
- Preloading resources
- ZIPped resources
- Spreadsheet (CSV)
- Canvas creation
- Setup for audio recordings collection
- Commands by element categories
- Standard Element Commands
- Audio element
- Button element
- Canvas element
- Function element
- Html element
- Image element
- Key element
- Scale element
- Selector element
- Text element
- TextInput element
- Tooltip element
- Timer element
- Var element
- Video element
- VoiceRecorder element
- Youtube element
- Special clear command
- Special end command
- Global PennController Commands
- PennController
- PennController.AddHost
- PennController.AddTable
- PennController.CheckPreloaded
- PennController.DownloadVoiceButton
- PennController.FeedItems
- PennController.Footer
- PennController.GetTable
- PennController.GetURLParameter
- PennController.Header
- PennController.InitiateRecorder
- PennController.PreloadZip
- PennController.ResetPrefix
- PennController.Template