Predicting tax morale in Nigeria with machine learning, from the NESG household survey of 15,043 respondents. Public API, interactive insights, and a plain-language model card.
# taxmorale
Public release layer for *A Machine Learning Approach to Predicting Tax Morale*
(Deji Joseph, PGD Computer Science, University of Abuja).
Serves the trained model, its evaluation results, the survey codebook, and
aggregate compliance patterns from the NESG Nigeria Tax and Subsidy Perception
Survey (2018–2019).
> **Research output, not a production decision tool.** The model predicts a
> self-reported *attitude* toward tax evasion, not observed compliance
> behaviour. Probabilities are uncalibrated and no fairness audit has been
> performed. It must not be used to make decisions about individuals.
## Layout
```
taxmorale/
├── apps/
│ ├── api/ FastAPI service — /api, and serves the built frontend
│ └── web/ Vite + React app — / (model card) and /insights
├── model/v1/ versioned artifact bundle, vendored from pgd-project
└── Dockerfile single image: builds the web app, runs the API
```
## Surfaces
| Path | What it is |
| -------------- | -------------------------------------------------------------------------- |
| `/` | Model card — what the model is, how it was trained, what it cannot do |
| `/insights` | Interactive explorer of observed compliance patterns |
| `/api/v1/…` | Public API (reference) |
| `/ask` | Natural-language query widget —**future work, not in this release** |
A static billboard at `
thedejijoseph.github.io` points here and stays
up independently.
## The model bundle
`model/v1/` is built by `pgd-project`'s `export_artifacts.py` and vendored in
whole. This repo never retrains, recomputes a metric, or re-derives a feature —
if a number is wrong it is fixed upstream and a new bundle version is committed
here.
To update:
```bash
# in pgd-project
uv run python export_artifacts.py --version v2
uv run python export_artifacts.py --verify # must pa …