# SHWRP-2026-013 reproducible research package

This directory contains the public version 1.0 working paper:

> 哪些農產品與米最有關？臺灣農產品價格共變、膳食互補與節慶需求之實證分析——以2026年毛豬供需調節為案例

DOI: `10.5281/zenodo.21367949`. The author's original analysis, text arrangement, code, and original figures are released under CC BY 4.0. Third-party source data and content retain their original terms.

## Reproduce the analysis

1. Use Python 3.11 or newer.
2. Install `requirements.txt`.
3. Place the official source files in `raw/` with these names:
   - `cpi-item-groups.xml`
   - `pig-transactions.csv`
4. Run:

```powershell
python research/rice-agricultural-linkages/analyze.py
node scripts/generate-rice-agricultural-linkages-paper.mjs
```

The analysis writes selected and derived data to `outputs/`, charts to `outputs/figures/`, and the searchable PDF to `paper.pdf`.

## Direct source endpoints used on 2026-07-15

- DGBAS CPI XML: `https://ws.dgbas.gov.tw/001/Upload/461/relfile/11525/230543/pr0101a3m.xml`
- MOA hog-market CSV: `https://data.moa.gov.tw/Service/OpenData/FromM/AnimalTransData.aspx?FOTT=CSV&IsTransData=1&UnitId=026`

Source descriptions, access dates, and licenses are recorded in `source-log.csv`.

## Public, derived, and private material

- Author-created material: `analyze.py`, the original analysis text, and original charts, released under CC BY 4.0.
- Third-party source material: official CPI, hog-market data, government reports, news reports, and academic publications. These are not relicensed by this package.
- Derived aggregate data: the CSV and JSON files in `outputs/`, released under CC BY 4.0 to the extent the author has rights to license them.
- Unused download: `raw/food-balance.csv` was inspected but not used because the endpoint returned only 2013–2015 aggregate categories and did not provide the continuous product-level series needed for the research question.
- Personal data: none are used. The only email and ORCID in the package belong to the author and are intentionally public.

## Interpretation limits

- Correlation is not causation.
- The prepared-rice-food CPI models are not cost shares, pass-through rates, or household demand elasticities.
- A formal test of dietary complementarity requires quantities and cross-price elasticities.
- The hog data stop on 2026-07-14. The paper does not estimate the effect of the 2026-07-15 closure or the 2026-08-27 Ghost Festival.
