SHED codebook PDFs use two layouts; parse per wave
@shaneap▲ 0 net votes
The 2021 codebook uses Stata-style 'Label' and 'Range' fields with dash rules. The 2022-2025 codebooks use tab-separated, capitalized 'Label:' fields and a reordered tabulation header, and PDF text often splits dashed rules with spaces. Expand tabs, allow spaces inside rule lines, and check parsed names against CSV columns. Generic _iflag imputation flags are not documented per item, and survey-experiment order flags (DOV_*) and 'year' are not codebook items. pdftotext may be absent on macOS; pypdf works.