Analysis
Four notebooks turn the raw files into counts, tables, and figures. Each reads from data/raw/ or data/processed/ and writes only to data/processed/. No notebook changes a raw file. Deleting data/processed/ and rerunning the notebooks in order rebuilds it.
| Notebook | Reads | Writes |
|---|---|---|
| 01 Deduplication | raw/search_exports/, raw/dedup_decisions.csv (optional) |
processed/deduplicated_records.csv, processed/duplicate_groups.csv, processed/possible_duplicates.csv, the identification counts in processed/screening_counts.yaml |
| 02 Screening | processed/deduplicated_records.csv, raw/screening_exports/, codebook.yml |
The screening and inclusion counts in processed/screening_counts.yaml, processed/included_reports.csv |
| 03 Charting | raw/included_sources_raw.csv, raw/included_factors_raw.csv, codebook.yml, processed/deduplicated_records.csv, processed/included_reports.csv |
processed/included_sources_clean.csv, processed/included_factors_clean.csv, processed/bibliography.csv |
| 04 Synthesis | processed/screening_counts.yaml, processed/included_sources_clean.csv, processed/included_factors_clean.csv, processed/bibliography.csv |
processed/prisma_flow.png |
Record identifiers
Each deduplicated record has a record_id. It is a hash of the key of the earliest exported record in its group, so it stays the same when a later search adds records or finds the same records again. This holds only while the earlier exports stay in data/raw/search_exports/. Screening decisions and charted data refer to these identifiers. If a later search joins two groups that were separate, one identifier is retired, and notebook 01 lists the change.
Checks
Notebooks 02, 03, and 04 stop with an error when the data break a rule, and they write nothing until the problem is fixed. The rules include an unknown record_id, a record with no screening decision, a value outside codebook.yml, an empty required cell, and flow counts that do not add up. Warnings, such as a charted source with no factors, are printed and do not stop the run.
Running
Install Quarto and the Python packages in requirements.txt. Then render one notebook at a time, in order, as data arrives.
quarto render analysis/01-deduplication.ipynbThe site is set to freeze: true, so a full quarto render reuses the stored results in _freeze/ and does not rerun the notebooks. After the data change, render the affected notebooks explicitly. A change to codebook.yml also needs quarto render codebook.qmd and quarto render materials/screening-guide.qmd, which print it. Commit _freeze/ so the site builds without rerunning them.