# Rice Statistics for Africa
A rice intelligence and policy-support platform for 55 African countries, built directly on
**FAOSTAT** and **USDA PSD**. It answers three questions and keeps them clearly apart:
1. **Where are we?** — historical statistics and structural diagnosis
2. **Where are we going?** — Box–Jenkins forecasts with prediction intervals
3. **What should we do?** — policy simulation and a least-cost path to self-sufficiency
Self-sufficiency indicators follow FAO (2001), *Food Balance Sheets: A Handbook*, as applied by
Gassi, Gul & Çetin (2025), *Rice Self-Sufficiency in Benin: Analysis and Forecasts*,
**IJFAEC 13(1), 29–42**. The platform reproduces that paper's published Table 1 exactly, as a
regression test (see *Golden test* below).
---
## Quick start
No toolchain required — no Node, no Python, no Docker.
```bash
powershell -ExecutionPolicy Bypass -File .\serve.ps1
```
Then open . The server rebuilds `index.html` whenever a source module
changes, and serves with `no-store` so a reload always reflects the last edit.
If port 8788 is unavailable — on Windows it can fall inside an administered exclusion range — pass
another one: `.\serve.ps1 -Port 8790`, and read `8790` for `8788` below.
Run the test suite at — **501 tests**, all green.
To publish the site to GitHub Pages, see DEPLOY.md.
The hero carries an **original vector illustration** of lowland paddies at dawn — drawn rather than
photographed because the platform is a single self-contained file with a no-external-request rule, so
a stock photograph would bring a licence, a CDN dependency and a megabyte with it.
To refresh the data from the official sources:
```bash
powershell -ExecutionPolicy Bypass -File .\tools\build-data.ps1 -Refresh
```
To rebuild the map boundaries:
```bash
powershell -ExecutionPolicy Bypass -File .\tools\build-geo.ps1
```
---
## Why this architecture
The brief specified Next.js + FastAPI + PostgreSQL + Redis + Celery + Docker. **None of those
runtimes …