GithubHelp home page GithubHelp logo

kryndex / experimentr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codementum/experimentr

0.0 2.0 0.0 9.69 MB

Backend (Node.js, redis), frontend (js), and analysis (R) for web-based visualization studies.

Shell 1.34% R 1.40% JavaScript 20.03% CSS 0.76% HTML 76.47%

experimentr's Introduction

Experimentr

========

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

Experimentr.js is a front-end framework for experiments.

Experiment stages are defined in modules. Modules consist of a small amount of HTML and Javascript and correspond to one stage of the experiment (such as a post-test).

Experimentr.js also contains several helper functions for experiments, such as timing. Check the source for more.

Modules

Experiment modules are defined in public/modules. Here is an example questionnaire module.

Modules will be loaded in order using the experimentr.sequence() function:

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 experimentr.hideNext() and experimentr.showNext().

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 <body>: <div id="experimentr">. 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

Start redis:

redis-server redis.conf

Run the server:

node app.js

Then access the page at localhost:8000.

Installation

Before-Clone Installation Dependencies:

Node.js

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

Redis

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 npm install

Testing experiments

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.

experimentr's People

Contributors

hanelarrison avatar codementum avatar evanpeck avatar karagam123 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.