Good organization means you can:
Every analysis project should live in one folder that contains everything needed to reproduce it.
project_name/
├── admin/
├── background/
├── code/
├── data/
│ ├── data_info/
│ ├── data_raw/
│ └── data_processed/
├── dissemination/
├── meetings/
├── output/
└── README.txt
PUBH_523_26Su/
├── admin/
├── data_lessons/
├── data_practice/
├── data_project/
│ ├── data_raw/
│ └── data_processed/
├── lessons/
├── practice/
├── project/
└── README.txt
PUBH_523_26Su/
├── admin/
├── data_lessons/
├── data_practice/
├── data_project/
│ ├── data_raw/
│ └── data_processed/
├── lessons/
├── practice/
├── project/
└── README.txt
admin: Contains course materials, syllabus, and other administrative documentsdata_lessons: Contains datasets used in lessonsdata_practice: Contains datasets used in practice assignmentsdata_project: Contains datasets used in the final project
data_raw: Original data — do not modify this!!data_processed: Cleaned/transformed data from labslessons: Contains lesson materials and codepractice: Contains practice assignments and codeproject: Contains labs and project code and assignmentsThere are a few good practices for naming files and folders for easy tracking:
Keep names short and relevant — and use lowercase letters.
script3.Rdata.csvthird_script_for_linear_model_v2.Rall_the_survey_data_collected_2024.csv03_wbns_modeling.Rwbns_data_2024.csvUsing uppercase is okay! This is something I do in our class documents. It’s just a little more annoying to type.
01_project-name_loading-data.R_ to separate words — no spaces!Use underscores _ to separate parts of a name. Never use spaces.
clean_data.Rclean-data.R01_cleaning-data.qmdsurvey_responses_2024.csvclean data.Rsurvey responses 2024.csvSome people use hyphens - to separate words and underscores _ to separate larger sections — both are fine, just be consistent!
Use leading numbers to keep files in the right order in any file browser.
01_import_data.R02_clean_data.qmd03_exploratory_analysis.qmd04_model.qmd05_figures.qmdz_misc to put a folder or file at the end of the orderYYYY-MM-DD formatIncluding dates keeps files in chronological order automatically.
report_2026-01-15.pdfreport_2026-03-02.pdfreport_2026-11-20.pdfreport_15-01-24.pdfreport_02-03-24.pdfreport_20-11-24.pdfStarting with the year means alphabetical order = chronological order.
You can label different versions of a file when you need to track changes.
analysis_v1.Ranalysis_v2.Rreport_draft_v1.qmdreport_draft_v2.qmd
Combine with dates for even more clarity:
report_2024-03-15_v1.qmdreport_2024-03-22_v2.qmdVersion labels are perfectly reasonable for coursework. For larger projects, clouds like OneDrive will save versions
Split your analysis into numbered, single-purpose documents:
| Script | Does |
|---|---|
01_import_data.qmd |
Loads raw data, minimal changes |
02_clean_data.qmd |
Filtering, recoding, joining |
03_explore.qmd |
Summary stats, exploratory plots |
04_model.qmd |
Statistical modeling |
05_figures.qmd |
Final publication-ready plots |
Every project folder should have a README.txt at the top level.
# Survey Analysis — Spring 2024
## What this project does
Analyzes student survey responses collected in March 2024.
## Data
- `data/raw/survey_2024.csv` — Original export from Qualtrics
- `data/processed/survey_clean.csv` — Cleaned version (run 01_clean.R)
## How to run
1. Open `my_project.Rproj` in RStudio
2. Run scripts in order: 01 → 02 → 03 → 04
## Dependencies
R 4.3+, tidyverse, ggplot2The key habits:
_ to separateYYYY-MM-DD — for chronological orderFolder and file organization