A Flask web app for ranking personal values via head-to-head comparisons, using Elo and Bradley-Terry scoring.
Values list from Brené Brown's Dare to Lead.
.
├── compose.yaml
└── app/
├── Dockerfile
├── requirements.txt
├── pyproject.toml
├── app.py
├── db.py
├── data/
│ └── values.txt
├── ranking/
│ ├── ranking.py
│ ├── eloranker.py
│ └── bradleyterryranker.py
├── static/
│ └── ranking.css
└── templates/
├── base.html
├── index.html
├── leaderboard.html
└── macros.jinja
docker compose up -d # build and start (detached)
docker compose down # stop and remove containers
docker compose logs web # view logsThe app will be available at http://localhost:8000.
cd app
./run_debug.shThis runs Flask with debug mode enabled (auto-reload + debugger).
/— presents two values side by side; clicking Vote submits a POST to/vote/vote— records the winner/loser pair in SQLite and redirects back to//leaderboard— shows all values ranked by Bradley-Terry score, with Elo and win/loss counts
Matchup selection uses Elo ratings to find closely matched pairs, then samples from a Beta distribution to prioritise items with fewer matches (Thompson sampling). Scores are recomputed from the full match history on each leaderboard load.