Giter Site home page Giter Site logo

afs_experiment's Introduction

See a minimal working example at http://stanford.edu/~bwaldon/cgi-bin/afs_experiment/index.html

How it works

A PHP script (collectdata.php) collects a participant's data and saves their results as a .json file on your web server. Participants enter some sort of identifying information (e.g. a name or a school ID), so you can keep track of them for compensation purposes. Note that this means you'll have to ensure that read permissions of your results folder are restricted to just yourself and system admins.

Instructions

Step 1: find an appropriate (i.e. PHP-enabled) web hosting service.

One option for Stanford affiliates is the Andrew File System (AFS). See here about how to request AFS services at Stanford: https://uit.stanford.edu/service/afs

Should you choose to use AFS, you'll also need to enable the Stanford Common Gateway Interface (CGI) service. More on enabling CGI here: https://uit.stanford.edu/service/cgi

Step 2: Design your experiment offline.

Hint: a nice feature about the 245B experiment templates is that you can preview the data that would be saved if your experiment were live. By default, your script won't do this - after a particpant completes the study, they're redirected to collectdata.php (note that PHP won't work on a local machine - you'll probably just see raw code in your browser). If you want to preview your results and not redirect to the PHP script, open up _shared/js/mmturkey.js and change line 116...

if (false) {

to:

if (true) {

Make sure to change this back to if (false) { before going on to step 3.

Step 3: Put your experiment online

Upload your experiment folder to the appropriate place provided by your web hosting service. For Stanford AFS users, this is the cgi-bin directory (PHP won't work elsewhere on AFS).

Step 4: Distribute your experiment URL.

Step 5: Condense your individual response files into one file (outputs full_results.json)

node results/convertdata.js 

Todo

  • A less awkward way to preview data collection locally.

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.