# West Africa maritime gateway demand — replication package
Technical replication code for a comparative synthetic-control study of
commercial-port merchandise activity around Ghana's October 2022 Guided Trade
Initiative operational episode, using IMF PortWatch AIS-derived port cargo and
CEPII BACI partner-share summaries.
This repository contains **scripts and derived analysis panels only**. It does
not contain manuscripts, author metadata, or journal submission files.
## Quick start (PowerShell)
```powershell
cd replication_package
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python run_all.py
python -m pytest tests -q
```
Expected primary outputs (already shipped in `data/estimates/` for verification):
- Synthetic-control merchandise path gap ≈ **+0.205** log points
- In-space placebo-rank **p ≈ 0.36**
- Primary clean horizon: November 2022–April 2026
Re-running `estimate_sc_sdid.py` overwrites JSON/CSV files under `data/estimates/`.
## Layout
| Path | Role |
|------|------|
| `run_all.py` | One-command estimation entry point |
| `scripts/estimate_sc_sdid.py` | Primary SCM, SDID/TWFE diagnostics, robustness JSON |
| `scripts/build_country_month_panel.py` | Country-month panel from daily PortWatch extract |
| `scripts/validate_port_crosswalk.py` | Commercial-port inclusion crosswalk |
| `figures/generate_results_figures.py` | Optional figure regeneration (not run by default) |
| `data/country_month_commercial.csv` | Balanced 12-country commercial-port panel |
| `data/estimates/` | Frozen estimation outputs |
| `docs/REPLICATION.md` | Full pipeline and data-access notes |
| `tests/` | Smoke tests on panel shape and headline numbers |
## Software
Tested with **Python 3.14** on Windows. Dependencies are pinned loosely in
`requirements.txt` (NumPy, pandas, SciPy, statsmodels, matplotlib).
## Data access (not all raw files are in this repo)
| Source | Use | Access |
|--------|-----|--------|
| IMF PortWatch / HDX | Dail …