Metadata-Version: 2.4
Name: edikit
Version: 0.2.5
Summary: Reproducible construction and auditing of social accounting matrices from official statistics
Project-URL: Homepage, https://github.com/kodzovee9/tekmeris
Project-URL: Repository, https://github.com/kodzovee9/tekmeris
Project-URL: Issues, https://github.com/kodzovee9/tekmeris/issues
Project-URL: Archive, https://doi.org/10.5281/zenodo.21419195
Author: Kodzovi Abalo
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: Eurostat,GRAS,RAS,SAM,input-output,national accounts,provenance,reproducibility,social accounting matrix,supply and use tables
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.11
Requires-Dist: openpyxl
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Provides-Extra: replicate
Requires-Dist: matplotlib; extra == 'replicate'
Requires-Dist: xlrd; extra == 'replicate'
Description-Content-Type: text/markdown

# Toolkit

`edikit` — a Python package for reproducible construction and auditing of
national social accounting matrices from official statistics. Modules
exist only when a paper needed them — nothing is built speculatively.

## Implemented modules

| Module | Role |
| --- | --- |
| `edikit.data` | source readers with accounting-identity checks on ingestion (SUT workbooks, SAM matrices, central-bank series, Eurostat JSON-stat, concordances) |
| `edikit.model` | account taxonomy with coverage assertions; RAS and GRAS (negative-tolerant) balancing with per-cell factor diagnostics |
| `edikit.report` | Excel workbooks whose totals and balance checks are live formulas |
| `edikit.pipeline` | end-to-end generation (`eurostat_sam`, for covered ESA country-years — see [recipes/build/COVERAGE.md](https://github.com/kodzovee9/tekmeris/blob/main/toolkit/recipes/build/COVERAGE.md)) and auditing (`audit`) |

## Roadmap stubs (empty packages, not yet implemented)

`edikit.forecast` (vintage logging, later P006), `edikit.benchmark`
(P002 — rankings with uncertainty bands), `edikit.decide` (P005+ —
scenario comparison). They gain content only when a paper needs them.

## Recipes

`recipes/` holds the three user-facing entry points, one per use case,
all thin scripts over the same library (see `recipes/README.md`):

- `recipes/replicate/` — regenerate every number in the P001 paper.
- `recipes/audit/` — audit a published SAM: structure, then macro
  controls (`python audit_sam.py --sam matrix.csv ...`); Kenya is the
  committed worked example.
- `recipes/build/` — generate a validated macro SAM for covered ESA
  country-years in one command
  (`python build_sam.py --country AT --year 2019`; see
  `recipes/build/COVERAGE.md` for which country-years the datasets
  support), with the adaptation guide for countries outside the
  Eurostat universe.

## Rules

- Logic lives here; paper folders keep only thin wrapper scripts and configuration.
- Every module ships with tests (accounting identities are test cases, not comments).
- Public API changes get a line in the changelog once anything external depends on this.

## Development

```
cd toolkit
pip install -e ".[dev]"
pytest
```
