Auto-generates per-country technical brief slide decks from framework outputs
# gaia-exante-report-generator
Standalone report-generation workflow for the **GAIA ex-ante framework**
(soil acidity / agricultural lime targeting in sub-Saharan Africa).
It takes the outputs of a completed framework run
(gaia-exante-framework,
locally `gaia-ex-ante-wow-shared`) and produces, per country, the EiA-style
summary slidedeck — *"Technical Brief: Targeting Agricultural Lime for Acid
Croplands in \ "* — as a compiled beamer PDF, together with every
underlying figure and LaTeX table.
Two design rules govern the module:
1. **The framework directory is strictly read-only.** Everything this module
creates (figures, tables, GADM boundary cache, slidedecks) is written into
its own `output/` folder. Even GADM boundary downloads, which the original
code wrote into the framework's `data-input/`, go to a local cache here.
2. **The analysis code is unchanged.** The figure/table functions are copied
verbatim from the framework so results are identical and fixes can be
diffed or ported in either direction. Only the path wiring differs.
---
## Example output (Kenya)
A full run for Kenya produces a ~25-slide deck. A few representative slides:
| Cover | Outlook |
|---|---|
| | |
**Spatial distribution of soil acidity** — exchangeable-acidity saturation and
pH maps over cropland:
**Top-10 most acidic counties** — cropland area split by high/low acidity:
**Potential additional production** from liming, as a chart and as a
crop-by-county LaTeX table:
| Chart | Table |
|---|---|
| | |
**Estimated yield loss** due to soil acidity (all crops vs maize):
**Lime requirements** for acid-soil remediation in the top-10 acidic counties:
**Profitability sensitivity** — crop-area-weighted profitability of liming
under varying price and productivity assumptions:
---
## What it produces
For each country (ISO3 code):
| Output | Location |
|---|---|
| Soil-acidity distribution maps (HP saturation, pH) | `output/figures_and_tables/ /` |
| Top-10 acidic a …