Skip to content

wmar-dev/value-ranking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Values Ranking

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.

Project structure

.
├── 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

Run with Docker Compose

docker compose up -d        # build and start (detached)
docker compose down         # stop and remove containers
docker compose logs web     # view logs

The app will be available at http://localhost:8000.

Run locally (without Docker)

cd app
./run_debug.sh

This runs Flask with debug mode enabled (auto-reload + debugger).

How it works

  • / — 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.

About

This is a web app for ranking values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors