Public procurement as contract-action flow: lifecycle measurement and supplier-market incidence
收藏资源简介:
# Replication Package This archive reproduces the public-data results reported in the final manuscript using only public procurement and SEC filing data. ## What is included - curated source code under `src/industrial_policy/`- configuration files under `config/`- one-command workflow scripts under `scripts/`- manuscript-facing reference outputs under `reference_results/` ## What is not included - raw procurement downloads- raw SEC downloads- cached derived data- draft manuscripts, review history, or unrelated exploratory files ## Public data sources The package rebuilds all required inputs from these public sources: - USAspending award-download API- USAspending transaction-download API- SEC Financial Statement Data Sets- SEC company-ticker / company-identifier lookup used during recipient matching ## Before you start 1. Install `uv`: <https://docs.astral.sh/uv/>2. Use Python 3.11 or newer.3. Set a valid SEC user agent before downloading SEC files. Example: ```bashexport SEC_USER_AGENT="your-name your-email@example.com"``` You can also edit `config/config.yaml` and replace the placeholder under `sec.user_agent`. ## End-to-end replication From the package root, run: ```bashbash scripts/run_end_to_end_replication.sh``` This script will: 1. create the local environment with `uv`2. download the public USAspending award data3. download the public USAspending transaction data4. download the public SEC Financial Statement Data Sets5. build the recipient-to-firm linkage6. run the validity, lifecycle, operational, salience, mechanism, wedge, magnitude, sample-composition, surprise, and inference modules7. rebuild the manuscript-facing tables and figures under `reference_results/` ## Step-by-step commands If you prefer to run the workflow manually: ```bashuv syncuv run industrial-policy ingest usaspending-download --config-path config/config.yamluv run industrial-policy ingest usaspending-transactions --config-path config/config.yamluv run industrial-policy ingest sec --config-path config/config.yamluv run industrial-policy match recipients --config-path config/config.yamluv run industrial-policy procurement jpube-validity --config-path config/config.yaml --timestamp repl_validity --overwriteuv run industrial-policy procurement jpube-revision-current-public --config-path config/config.yaml --timestamp repl_public --overwriteuv run industrial-policy procurement jpube-revision-sample-composition --config-path config/config.yaml --timestamp repl_sample --overwriteuv run industrial-policy procurement jpube-revision-magnitudes --config-path config/config.yaml --timestamp repl_magnitude --overwriteuv run industrial-policy procurement jpube-revision-surprise --config-path config/config.yaml --timestamp repl_surprise --overwriteuv run industrial-policy procurement jpube-revision-inference --config-path config/config.yaml --timestamp repl_inference --overwriteuv run python scripts/build_reference_results.py``` ## Expected outputs After a successful run, the package will create: - `data/derived/` intermediate parquet and DuckDB files- `outputs/procurement/` module-specific snapshots- `outputs/tables/` and `outputs/figures/` consolidated result files- `reference_results/tables/` manuscript-facing CSV tables- `reference_results/figures/` manuscript-facing figures- `reference_results/checksums.sha256` for quick verification ## Notes on runtime and size - The SEC rebuild and procurement downloads can take substantial time.- USAspending downloads are cached locally after the first run.- The replication workflow is public-data only, but still compute-heavy because it rebuilds quarterly firm-level panels from scratch.



