Project structure for reproducible research

Description

A standard, templated folder layout that separates raw data, processed data, code, notebooks and outputs so any UX study can be rerun and audited.

A reproducible project structure encodes good practice in the file system. Raw data is immutable and read-only; every processed file is regenerated by code; notebooks, source code, figures and reports each have a fixed home; and a README states how to rebuild results end to end. Templating the layout (for example with cookiecutter) means every study in a research organisation looks the same, so colleagues can audit, reuse and hand over work. The rigour comes from the directional flow (raw to interim to processed to outputs), from relative paths via pathlib rather than hard-coded personal paths, and from a single entry point (a Makefile or pipeline script) that reproduces every figure.

Attributes

Loss type
Unmigrated
Stage
Evaluation
Effort
Hours

Steps

  1. Generate each new study from a shared cookiecutter template rather than an empty folder.
  2. Place original exports (survey files, transcripts, logs) in data/raw and make them read-only; never edit them by hand.
  3. Write all transformations as code that reads from data/raw and writes to data/interim or data/processed.
  4. Keep notebooks in notebooks/, reusable functions in src/, and generated figures and tables in reports/.
  5. Use pathlib with paths relative to the project root, never absolute personal paths.
  6. Provide one command (e.g. make all) that rebuilds every reported output from raw data, and test it before delivery.
  7. Document data sources, consent constraints and the rebuild command in the README.

Sources

  • Python (pandas, numpy, pathlib)
  • Jupyter Lab
  • Git
  • conda/venv
  • cookiecutter project templates
  • Wilson, G. et al. (2017) Good enough practices in scientific computing. PLOS Computational Biology
  • Noble, W. S. (2009) A quick guide to organizing computational biology projects. PLOS Computational Biology
  • The Inquiry Series, C1 — The Python Research Environment — Setup, Philosophy & Reproducibility

Also known as

  • Research project scaffolding
  • Cookiecutter data science layout

Categories

  • Research Operations
  • Research Design & Rigor