> For the complete documentation index, see [llms.txt](https://gitbook.bergelsonlab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.bergelsonlab.com/data-and-code/blab_data.md).

# BLAB\_DATA

A set of GitHub repositories with data from SEEDLingS and VIHI that are cloned to \~/BLAB\_DATA allowing the code to access specific versions of that data.

## Get access to the data

With the exception of `seedlings-nouns`, all repositories are private to the members of the [BergelsonLab](https://github.com/BergelsonLab/seedlings-nouns_private) github organization. Every new lab member should be added to it. If you haven't been added yet, ask someone on staff to add you.

## Clone data to your computer

In Terminal:

```
$ cd ~
$ mkdir BLAB_DATA
$ cd BLAB_DATA
```

### Download the current version of the repositories you need:

```shell
git clone https://github.com/BergelsonLab/all_basiclevel.git
git clone https://github.com/BergelsonLab/cdi_spreadsheet.git
git clone https://github.com/BergelsonLab/motor_spreadsheet.git
git clone https://github.com/BergelsonLab/reliability.git
git clone https://github.com/BergelsonLab/seedlings-nouns_private.git
git clone https://github.com/BergelsonLab/seedlings-nouns.git
git clone https://github.com/BergelsonLab/vihi_annotations.git
git clone https://github.com/BergelsonLab/clf_eyetracking.git
```

## Load data from R code

Use `blabr`'s `get_*` functions to load data into memory. See the list of functions [here](https://bergelsonlab.com/blabr). For example, [`blabr::get_cdi_spreadsheet()`](https://bergelsonlab.com/blabr/reference/get_cdi_spreadsheet.html) retrieves the CDI data for SEEDLingS babies. Always default to specifying a version when doing that so that your script is reproducible. If you want to use the latest version at the moment you are writing the code, run these functions once without specifying the version - you will receive a warning saying that you shouldn't do that. That warning will also include the version - copy it into the function call.

## Updating data

Because of how `blabr` and `blabpy`access data in `~/BLAB_DATA`, avoid editing data directly in that folder. Instead, make a dedicated clone to work in.

{% hint style="info" %}
What can happen is that your script that updates the data calls a \`blabr\` function that checks out a different version of a repo while you are updating leading to unpredictable results.
{% endhint %}
