Organising an analysis project
Lesson opener
In one line: This is for analysis that answers a question and then has to be defensible later.
Why it matters: This shows up at work when you need to one folder layout that works for Excel work, SQL work and notebook work - and the three rules that make it survive six months of neglect..
Before this lesson: Git & workflow
Before you start
| Resource | Link |
|---|---|
| Previous | Git & workflow |
| Next | Node.js & npm install |
No prerequisites. If you have ever opened a folder and found final_v2.xlsx, final_v3.xlsx and final_v3_ACTUAL_USE_THIS.xlsx sitting next to each other, this lesson is for you.
What you will learn
One folder layout that works for Excel work, SQL work and notebook work — and the three rules that make it survive six months of neglect.
The problem this solves
Analysis work is not lost because people cannot analyse. It is lost because six months later nobody can answer three questions:
| Question | What it costs when you cannot answer it |
|---|---|
| Where did this number come from? | You rebuild the whole analysis to defend one figure in a meeting |
| Is this file current? | You present last quarter's data and find out in the room |
| Which version did we actually send? | Two people quote different totals from "the same" report |
A folder structure is not admin. It is the thing that lets you answer those three questions in under a minute.
The structure
One folder per job, not per month, not per tool. A job is a question somebody asked you.
| Folder | What goes in it | What does not |
|---|---|---|
00-brief/ | What was actually asked, in writing, and who asked | Your interpretation of it |
01-source/ | Exports exactly as they arrived, date-stamped | Anything you have touched |
02-working/ | Cleaned files, scratch notebooks, half-finished things | Anything you would show a stakeholder |
03-analysis/ | The queries and notebooks that produce the answer | Data cleaning steps |
04-output/ | The deck, the report, the charts you actually sent | Drafts |
README.md | What the job was, how to re-run it, where the source came from | Everything else |
Rule 1 — Number the folders
Windows File Explorer sorts alphabetically. Without numbers, analysis comes before source, and brief comes before both — the exact reverse of how you work.
Two digits, not one. 01 through 04 today; when you add 10-appendix later, 1-brief would sort next to it and the order breaks.
Rule 2 — Source data is read-only
The single most expensive habit in analysis work is opening the export, fixing a few rows, and saving over it. The moment you do that, the raw data is gone and every number you produce becomes unverifiable.
Treat 01-source/ as if it were on someone else's computer. Read from it. Never write to it.
Alongside each export, drop a plain text file:
sales-export-2026-08-14.xlsx
Pulled from : ERP > Reports > Sales by Region
Pulled by : Rana
Pulled on : 14 Aug 2026, 09:20
Filters : FY2026 Q3, all regions, excludes cancelled ordersThirty seconds of typing. It is the difference between "I think this is Q3" and knowing.
Rule 3 — Date-stamp, do not version-guess
sales-export-2026-08-14.xlsx tells you when the data is from.
final_v3_ACTUAL_USE_THIS.xlsx tells you that at some point somebody was tired.
Use YYYY-MM-DD — it sorts correctly, and it is unambiguous in every country. 08-14-2026 and 14-08-2026 are the same file to you and different files to a colleague.
The README
One file, at the top, written when you finish — not when you start.
# Q3 2026 sales review
Asked by : Priya (Regional Head), 12 Aug 2026
Question : Why did North region revenue drop in Q3?
Answer : Two accounts churned in July; the rest of the region grew 4%.
Source : 01-source/sales-export-2026-08-14.xlsx (ERP, Q3 FY26)
Analysis : 03-analysis/revenue-by-region.sql
Sent : 04-output/q3-review.pptx, 19 Aug 2026Six lines. In six months this is the only thing standing between you and rebuilding the entire job from memory.
Practice
You do not need a finished analysis for this. Build the empty shell once, so the habit is ready before the first real job arrives.
- Pick a made-up question — for example: "Which region sold the most last month?"
- Create one job folder named
YYYY-mm-topic(e.g.2026-08-region-sales/). - Inside it, create the five folders from this lesson plus an empty
README.md. - In
00-brief/, write one sentence: who asked, and what they asked. - In
01-source/, add a shortwhere-it-came-from.txtwith placeholder lines (system, date, filters) — leave the export itself for when you have real data.
When a real export shows up later, it drops into 01-source/ untouched. Cleaning starts in 02-working/. You will never be deciding folder names under deadline pressure.
What this is not
This is not a software project layout. If you have seen structures with src/, __init__.py and unit tests, those are for code that ships and gets maintained by a team.
This is for analysis that answers a question and then has to be defensible later. Different job, different shape.
Teacher walkthrough: folders that survive Monday
All figures illustrative.
Step 1 — Separate raw, interim, outputs. Never overwrite raw extracts.
Step 2 — One README with question, grain, and how to rerun.
Step 3 — Pin environment (requirements.txt / env name).
Step 4 — Name notebooks/scripts by purpose, not final_v7.
Failure example: overwritten raw CSV
Symptom: Cannot reproduce last week's number; blame spreadsheets.
Diagnosis: Cleaned file saved over raw download.
Correction: data/raw read-only habit; writes only under data/interim or outputs.
Validation: Raw checksum/date unchanged after analysis.
Guided practice
Where should a one-off exploratory chart PNG go?
Complete solution: outputs/ (or dated subfolder) — not beside raw CSVs.
Independent practice
Acceptance criteria:
- Folder layout documented (raw/interim/outputs/src).
- README states business question + grain.
- One reproducible run instruction.
- Git ignore for outputs/secrets as appropriate.
Common mistakes
- Mixing secrets into the repo root.
- Multiple "final" notebooks with diverging logic.
- No record of filter criteria.