LogoLogo
  • Introduction
  • Getting Started
    • Setup
      • Windows WSL Instructions (new)
      • Windows WSL Instructions
      • Linux Instructions
    • Creating your experiment
    • Running your experiment
    • Updating your experiment
  • Conceptual Overview
    • Game Life Cycle
      • Customising when players submit stages
    • Concepts
    • Randomization & Batches
    • API
  • Guides
    • V2 Migration
    • Managing the Data
    • Special Empirica Components
    • The Admin Panel
    • Deploying Your Experiment
      • Ubuntu tutorial
  • Tutorials
    • Beginner Experiment: Prisoner's Dilemma
      • Part 1: Before you start
      • Part 2: Creating the Experiment in Empirica
      • Part 3: Getting Accustomed to the Code
      • Part 4: Coding the Prisoner's Dilemma Game
        • Part 4.1: Removing example code
        • Part 4.2: Intro Text
        • Part 4.3: Set up the game stages
        • Part 4.4: Build the "Choice" React Component
        • Part 4.5: Build the "Result" React Component
        • Part 4.6: Compute the Score
      • Part 5: Customizing the experiment
        • Part 5.1: Changing the number of rounds
        • Part 5.2: Turning the chat on and off
      • Part 6: Deployment
  • FAQ
    • I need help!
    • The Processes and Elements of an Empirica Experiment
    • Managing Players and Games
  • Resources
    • Helpful Linux Commands
    • Code Editors
    • Javascript and React
  • Links
    • Empirica website
    • Twitter
    • GitHub
Powered by GitBook
On this page
  • Recording the data
  • To the player
  • To the game, round or stage
  • To the player.game, player.round or player.stage
  • Exporting the data

Was this helpful?

Edit on GitHub
Export as PDF
  1. Guides

Managing the Data

Recording the data

There are multiple places where you can record data in an Empirica experiment.

To the player

One way of recording the data of players' responses is to set them to the player prop itself. You can do so with this command:

player.set("name_of_property", value)

You can retrieve what you have set as a specific property/answer for the player with:

player.get("name_of_property")

To the game, round or stage

If you want to save general data (not specific to one player), you can save it to the game, round or stage with:

game.set("name_of_property", value)
round.set("name_of_property", value)
stage.set("name_of_property", value)

You can retrieve what you have set as a specific property/answer with:

game.get("name_of_property")
round.get("name_of_property")
stage.get("name_of_property")

To the player.game, player.round or player.stage

One way of recording the data of players' responses is to set them to the player.game, player.round or player.stage prop to identify a particular data/response of a particular player to a particular game, round or stage. You can do so with this command:

player.game.set("name_of_property", value)
player.round.set("name_of_property", value)
player.stage.set("name_of_property", value)

You can retrieve what you have set as a specific property/answer with:

player.game.get("name_of_property")
player.round.get("name_of_property")
player.stage.get("name_of_property")

Exporting the data

Empirica can export your data to CSV format by running from the root of your experiment:

$ empirica export

This will create a zip file containing multiple csv files. Each file represents an object type (batches, games, players, rounds...). Each line is one of those objects. And each column is one of the keys in the object. For example, if you do player.set("myvar", 42), in the export, you will find a line in the players.csv file where the myvar column will contain 42.

PreviousV2 MigrationNextSpecial Empirica Components

Last updated 2 years ago

Was this helpful?