Metadata-Version: 2.4
Name: maritime-choke
Version: 0.2.0
Summary: Interactive model of macroeconomic risk from maritime-chokepoint trade disruptions
Author: Fathimath S. Vemmarath, Vipin P. Veetil
Maintainer-email: "Vipin P. Veetil" <vipin.veetil@gmail.com>
License: MIT
Project-URL: Homepage, https://bitbucket.org/VipinVeetil/chokepoints
Project-URL: Source, https://bitbucket.org/VipinVeetil/chokepoints
Keywords: production networks,input-output,maritime,chokepoints,trade disruption,systemic risk,economics,supply chains
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Framework :: Flask
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: scipy>=1.10
Requires-Dist: matplotlib>=3.6
Requires-Dist: flask>=2.2
Requires-Dist: platformdirs>=2.6
Requires-Dist: certifi>=2022.0.0
Provides-Extra: dev
Requires-Dist: pyshp>=2.3; extra == "dev"
Requires-Dist: pandas>=1.5; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# maritime-choke

An interactive model of the macroeconomic risk from **maritime-chokepoint trade
disruptions**. Close any set of the world's 12 major shipping chokepoints, pick a
`(τ, ρ, ϱ, δ)` calibration, solve a short-run production-network model forward, and
explore where the value-added loss falls — on an interactive world heat map, by
country, and by sector — all in a local browser GUI.

Based on *Macroeconomic Risks from Maritime Trade Disruptions* (Vemmarath &
Veetil). Source & data: https://bitbucket.org/VipinVeetil/chokepoints

## Install

```bash
pip install maritime-choke
```

## Run

```bash
maritime-choke run
```

That's it. On first launch this **downloads the model cache** (~90 MB, not
shipped in the wheel; published on Zenodo, **DOI
[10.5281/zenodo.21263267](https://doi.org/10.5281/zenodo.21263267)**) and then
**opens the GUI in your browser** at http://127.0.0.1:5057. Stop it with Ctrl-C.

To pre-fetch the data on its own (e.g. offline prep), or install it from a local
copy:

```bash
maritime-choke fetch-data
maritime-choke fetch-data --from-local /path/to/model_cache_2019
```

Pick chokepoints, set the calibration, hit **Run scenario**. The defaults are
the paper's baseline `(τ, ρ, ϱ) = (0.3, −1, −1)` with uniform leakage
`δ = 0.10`; the commodity-differentiated energy leakage (δ = 0.45 on
B05/B06/C19) is available as a toggle. Results are written
to a per-user folder (see `maritime-choke where`) and shown in the page:
world value-added loss, a relatable "scale of the loss" comparison, the world
heat map (recolour by any of 50 sectors), and per-country / per-sector drill-downs.

## Commands

| command | what it does |
|---|---|
| `maritime-choke run` | launch the GUI (`--port`, `--no-browser`) |
| `maritime-choke fetch-data` | download/install the model cache (`--url`, `--from-local`, `--force`) |
| `maritime-choke pack-data <dir>` | pack a local cache into a `.tar.xz` for hosting |
| `maritime-choke where` | show data / cache / run-output locations |
| `maritime-choke build-data` | how to rebuild the cache from GTAP + OECD ICIO |

Data locations can be overridden with `MARITIME_CHOKE_DATA` (cache root) and
`MARITIME_CHOKE_RUNS` (run outputs). The download URL can be set with
`MARITIME_CHOKE_DATA_URL`.

## Data & licensing

The model cache is derived from OECD ICIO (freely downloadable) and the licensed
**GTAP 10** data base. The raw GTAP data is *not* redistributed; if you need to
rebuild the cache from scratch you must supply your own GTAP licence — see
`maritime-choke build-data`. The shipped map/comparison assets are built from
public Natural Earth and World Bank data.

## License

MIT (code). Underlying GTAP and OECD ICIO data are governed by their own terms.
