Writing the Economics Research Article — analysis code
======================================================

This is the pipeline that produced every statistic in the book.

Setup
    pip install -r requirements.txt
    python -m spacy download en_core_web_sm

Put the corpus files in corpora/ (download them from the site), then

    python run_all.py --book books/econ.yaml --tag   # first run: builds the POS cache
    python run_all.py --book books/econ.yaml         # regenerates every statistic
    python tables.py  --book books/econ.yaml         # the book's tables as PDFs
    python tools/build_web.py                        # rebuilds this website's data

Outputs land in results/econ/: results.json (all statistics, keyed),
summary.md (readable digest), tables/ (print-ready PDFs).

What to read first
    README.md               orientation, conventions, corpus-first principle
    WORKSPACE_OVERVIEW.md   plain-language account of components and procedure
    GLOSSARY_SOURCE.md      every operationalised term, defined
    codings/CODING_CRITERIA.md   the rulings behind the manual classifications
    definitions/*.yaml      what counts as what — edit these, not the code

Licence
    Code: use freely, with attribution.
    Corpus: CC BY 4.0 — see ATTRIBUTION.txt with the corpus download.
