Skip to content

Latest commit

 

History

History
289 lines (214 loc) · 10.9 KB

data.rst

File metadata and controls

289 lines (214 loc) · 10.9 KB

Data storage

While the different kinds of elements are responsible for what happens on screen, data storage collects participants' responses, records their actions, and keeps them in store for later retrieval and export.

Collected data can have many origins and takes many forms. Different types of data are separated into different variables, each of which can save a different indicator or type of data. For example, many experiments will require collection of observed behavior, decisions, or judgments alongside the time participants needed to respond to the stimuli presented. Each variable, in turn, can vary over time, taking on different values as the experiment proceeds. In many cases, variables will change from screen to screen, as every new display elicits new data to be recorded.

A :jsdata.Store provides two central functions. First, it maintains the state of the experiment, which is comprised of the latest value of each variable. Second, a store archives the history of all variables over the entire course of an experiment.

The entire history in lab.js is represented as a long-form dataset, in which each variable is contained in a column, and the values over time are stored in rows. All data can be exported at any time for further processing and analysis, either as comma separated value (csv) file, or as JSON-serialized data.