Data & code for "When investment cannot calm the sea: swell exposure, terminal modernization, and vessel time in port at an open-coast West African gateway" — AIS port calls × ERA5 sea states, Port of Nouakchott, 2019–2026.
# When investment cannot calm the sea — Data & code
Replication package for the paper:
> **"When investment cannot calm the sea: swell exposure, terminal modernization,
> and vessel time in port at an open-coast West African gateway"**
> (manuscript under review, 2026).
The paper matches 2,581 commercial port calls at the Port of Nouakchott
(Mauritania), reconstructed from Global Fishing Watch (GFW) satellite AIS
port-visit events (January 2019 – May 2026), with hourly ERA5 sea states, and
estimates the first vessel-level dose–response function between routine swell
and total port time for an African port.
## Repository structure
```
.
├── data/ # ready-to-use datasets (CSV, open in Excel)
│ ├── escales_avec_houle_nouakchott.csv # worked calls (>=18 h) x sea-state exposure
│ ├── escales_avec_houle_decomposee_v2.csv # same + swell / wind-sea decomposition
│ ├── houle_era5_nouakchott_RAPIDE.csv # hourly ERA5, PRIMARY extraction (time-series service)
│ └── houle_era5_nouakchott_2019_2026.csv # hourly ERA5, SECONDARY extraction (area retrieval)
├── code/
│ ├── 01_extract_gfw.py # query the GFW Events API (port visits)
│ ├── 02_extract_era5.py # download ERA5 sea states from the Copernicus CDS
│ ├── 03_clean_and_match.py # cleaning pipeline (Table 1) + variable construction
│ ├── 04_estimations.py # all regressions of the paper (Tables 3-6 + checks)
│ └── 05_figures.py # analysis figures
├── figures/ # figures as they appear in the manuscript
├── requirements.txt
└── README.md
```
## Quick start (reproduce the headline result in 2 minutes)
```bash
pip install -r requirements.txt
python code/03_clean_and_match.py # rebuilds the analysis sample from data/
python code/04_estimations.py # prints Table 3: swell coefficient 0.401 (SE 0.054)
python code/05_figures.py # …