Experimentr is a hosting/data-collection backend and module-based frontend for web-based visualization studies.
This repo is a working experiment. The best way to get started is to copy this repo and edit it for your experiment.
Experimentr.js is a front-end framework for experiments.
Experimentr.js also contains several helper functions for experiments, such as timing. Check the source for more.
Experiment modules are defined in
Here is an example questionnaire module.
Modules will be loaded in order using the
experimentr.sequence([ 'modules/consent', 'modules/self-assessment-manikin', 'modules/emotion-prime-story', 'modules/demographics', 'modules/nasa-tlx' ]).start();
In some modules the Next button is not needed, so it can be hidden and shown via
Each module must be unique and cannot be loaded twice in experimentr.sequence(). For example, if you use the same questionnaire as a pre-test and post-test, the same questionnaire HTML must appear in two uniquely named files.
For example modules, please see public/modules/.
How Experimentr Works
Once experimentr.js loads, it creates a div in
Experimentr then adds three elements to the page:
- ``#experimentr` div: to hold the module and controls
- ``#module` div: holds module content
- ``#control` div: holds controls for the modules
Running the server
Run the server:
Then access the page at localhost:8000.
Before-Clone Installation Dependencies:
To find installation instructions for your operating system (Linux, OSX, and Windows), please visit https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
Note: Redis is not installed through
npm install and must be installed separately.
Redis can be manually downloaded at redis.io/download. Please note that Windows is not directly supported, however there is an experimental Windows port maintained by Microsoft. If you are on OSX and have
brew installed, you can install Redis with the following:
brew install redis.
Clone and Post-Clone Installation:
- clone this repo
- cd to this repo and run
You can use
debug as your workerId when testing live experiments to help make sure your data doesn't end up the experiment data.
See convert.js for details.
Another useful trick is to empty the redis database. To do so, run
redis-cli to get the redis command line prompt, then type
FLUSHDB to delete all current keys.
More redis commands can be found at http://redis.io/commands.