> For the complete documentation index, see [llms.txt](https://docs.empirica.ly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.empirica.ly/guides/managing-the-data.md).

# 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`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.empirica.ly/guides/managing-the-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
