# Version control - data

## Content 💡👩🏽‍🏫  

In the following you'll find the `objectives` and `materials` for each of the topics we'll discuss during this session.

### Motivation 
[Research Data Management](https://the-turing-way.netlify.app/reproducible-research/rdm.html) is a core component of good scientific practice and can help to make your work not only more reproducible and transparent but also easier, and version control for data can be one component of it.
This session introduces [DataLad](https://datalad.org), a data management and data publication tool building up on version control systems.

If you answer "yes" to any of the following questions, this session will be interesting for you:

Have you ever worked through such a directory?

<img src="https://phdcomics.com/comics/archive/phd052810s.gif" alt="A directory filled with almost identical files, differing only by slight name version variations that get increasingly chaotic" style="height: 400px;">

Is this metaphor fitting to a paper of yours?

<img src="https://cdn.dribbble.com/users/1218634/screenshots/3090048/full-stack-front-end-back-end-comic-joke.png" alt="A beautiful mermaid fascinating a man, but unknown to the man, the hidden back of the mermaid is a monster - A metaphor for papers (the beautiful mermaid) and their project directories (the hidden horror)" style="height: 360px;">

Have you ever looked like this trying to figure out how a colleagues script is supposed to work (or an old script of yourself)?

<img src="https://phdcomics.com/comics/archive/phd012805s.gif" alt="A researcher pulling her hair over futil attempts to understand and run something on a computer" style="width: 480px;">

Do you find yourself wondering how to share or publish the data and results of your recent project?

<img src="https://www.socialsciencespace.com/wp-content/uploads/625px-To_deposit_or_not_to_deposit_that_is_the_question_-_journal.pbio_.1001779.g001.png" alt="An explorer carrying a large data box to a sign pointing at a data repository" style="width: 480px;">


#### Objectives 📍
- Understand why we should not only version control code and other small files, but also data or software
- Understand the advantages of distributed version control for data
- Get first-hand usage experience with DataLad, and master the following DataLad concepts:
    - Create and consume datasets
    - Perform version control on arbitrarily sized digital objects
    - Link components of a data analysis (code, data, software) together
    - Run and rerun computationally reproducible data analyses

#### Materials 📓

You can find the `slides` [here](https://github.com/datalad-handbook/course) or you can directly [download](https://doi.org/10.5281/zenodo.6364571) them from Zenodo.


### Questions you should be able to answer based on this lecture 🖥️✍🏽📖

:::{admonition} Why should you version control data?
:class: tip, dropdown
Data changes and evolves just like code or other text-based files. Version controlling data does not only structure your projects transparently, it also provides the basis for reproducibility as it helps you to identify data in its precise version.
And just as code or manuscripts are often collaborative endeavours that benefit from the features of distributed version control tools, data analyses or publishing data are collaborative projects that become easier with streamlined processes for collaboration, too.
:::


### optional reading/further materials

If you want to learn more about DataLad or research data management in general, there are several major resources:

- 📙 [The DataLad Handbook](http://handbook.datalad.org/en/latest/)
- 📺 [The DataLad Youtube channel](https://www.youtube.com/c/DataLad)
- 🙋 [Technical forum](https://neurostars.org/search?q=datalad%20category%3A1)
- 💬 [Community chat](https://matrix.to/#/#datalad:matrix.org)

Additionally, you can find an overview of recorded workshops and past tutorials at [github.com/datalad/tutorials](https://github.com/datalad/tutorials). 