October 10, 2022

Rule 1

Every project lives in its own folder.

Rule 2

Not all subfolders are equal.

  • Distinguish folder types, name them accordingly:
    • Read-only: data, metadata
    • Human-generated: code, paper, documentation
    • Project-generated: clean data, figures, models…
  • This ensures you do not accidentally touch what you shouldn’t touch…
  • …or that your project as it progresses clutters up your system.

For example

PROJECT/
├── data/
│   ├── raw_data/
|   |   ├── metadata.json
|   |   └── raw_data.csv
│   └── clean_data/
|       └── data_cleaned.csv
├── results
│   ├── figures/
│   |   ├── chart.png
│   └── output/
│   |   └── statistics.csv
├── docs/
│   ├── manuscript.Rmd
│   └── journal.md
├── code/
│   ├── analyse_data.R
│   └── clean_data.R
└── README.md

OK, stop.

To hell with rules, let’s explain some things: