How it works
- 01 · MAPReads the headers and asks you to confirm the column map before anything is converted.
- 02 · NORMALIZERewrites each row into pack schema v1 and records its source file and row.
- 03 · FLAGStops on missing values, duplicates and unit mismatches, and lists each one in qa_log.json.
Example output
Illustrative · sample datanormalize.py · run summary
2 valid rows, 0 flags
Row 2 of sample.csv becomes organic sessions 14,776R2; row 3 becomes direct sessions 4,018R3. Each value keeps its source file and row, so the drafter can tag the figure later. Nothing was guessed: a gap, a duplicate or a unit mismatch would have stopped the run.
kpi_normalized.csv
rowperiod · channel · metricvalue
R22026-09 · organic · sessions14776
R32026-09 · direct · sessions4018
Works best when
- Each export covers one client and one reporting period
- You confirm the column map before the run
- Every flag is resolved before ASK-02 drafts
It will not
- Fill a gap or guess a missing figure
- Merge duplicate or mismatched rows silently
- Draft, send or publish anything