FactorsDB is an open-source repository of experiments that run natively in a web browser.
FactorsDB was created to curate a collection of high-quality browser-based experiments for classroom demonstrations. The experiments require no additional software to run, making it easy for instructors and students to use the experiments in a classroom setting. Anyone is free to use, contribute to, or modify the experiments on this site. The site is hosted on GitHub and the entire contents of the site is a GitHub repository.
FactorsDB was created by Josh de Leeuw at Indiana University.
Find an experiment, either by looking at the list of all experiments, or searching by category in the menu on the left. Click Start Experiment to launch the desired experiment. Experiments should run smoothly in any up-to-date web browser, but if you are having trouble try running the experiment in Google Chrome.
The entire contents of the FactorsDB site exists as a GitHub repository. You can create a copy of the repository and publish your own version of the site with just a few clicks. Then you can modify any of the experiments on the site by editing the experiment file. This is a great way to let students try variations of different experiments for a project, or to learn how to use jspsych.
You will need a free GitHub account to fork (copy) the FactorsDB repository. Sign up here.
Go to the GitHub page for FactorsDB and click the Fork button near the top right corner of the page.
All of the experiments on FactorsDB are contained in the
of the repository. Open the folder to view a list of all the experiments. Find
the one you want to modify and click on the filename to open it in the GitHub
viewer. Then click the edit icon (pencil) near the top right corner of the
Edit the experiment file as you see fit. Create a new commit by writing a brief commit message in the box below the file contents and then click the green Commit Changes button. Make sure to select the option Commit directly to the gh-pages branch.
Once you have forked and made at least one change to the repository, GitHub will
automatically build a new copy of the website linked to your account. You can
view your copy of FactorsDB by going to
Contributing an experiment is a similar process to modifying an experiment, with a few extra steps. Follow the steps described above to create a GitHub account and fork the FactorsDB repository. Then follow the steps below.
All experiments are stored in the _experiments folder in the repository. To add a new experiment, create a new .html file in that folder. You can either create an empty .html file, or copy and rename one of the existing .html files. The copy-and-rename strategy has the added benefit of giving you a template to modify.
At the top of all experiment files is a section called front matter. This is a term from the Jekyll engine used to render the GitHub repository into the FactorsDB website. The front matter is written in YAML. This section is where various experiment parameters are specified. The valid parameters are:
title: The title of your experiment.
description: A description of your experiment.
jspsych_version: The version of jspsych used to run your experiment.
required_plugins: The jspsych plugins that are required to run the experiment.
categories: The experiment categories that your experiment belongs in.
true, loads the highcharts.js graphing library.
You should use
$('#jspsych-target') as the parameter for
jsPsych.init() call for your experiment.
Once you are done writing your experiment, you can submit a pull request to merge your changes with the FactorsDB repository. For more information about how to submit a pull request, see the GitHub documentation on using pull requests.
If you need help using the site, modifying an experiment, or creating a new experiment, send me an e-mail at email@example.com.
If you find a bug, a broken link, or other technical problem with the site, post a new issue in the GitHub issue tracker. You should also use the issue tracker for requesting new experiments or features.
FactorsDB by Josh de Leeuw is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.