A website that visualizes and analyzes Approval Voting election results. View it at approval.vote.
Approval.Vote provides detailed reports and visualizations for Approval Voting elections, where voters can select multiple candidates and the candidate with the most votes wins. The site features:
- Vote Count Visualizations: Bar charts showing candidate support
- Co-Approval Analysis: Matrix showing how often voters approved candidate pairs together
- Voting Pattern Analysis: Distribution of how many candidates voters approved
- Cast Vote Record Processing: Tools to parse and analyze raw ballot data
The site is built with SvelteKit and hosted on GitHub Pages.
-
Install mise and trunk:
# macOS brew install mise trunk-io # Other platforms: see mise.jdx.dev and trunk.io
-
Set up development environment:
mise install # Installs Node.js 20 trunk install # Installs linters and formatters npm ci # Installs dependencies
-
Start development server:
npm run dev
We use trunk.io for consistent code quality:
trunk check # Run all linters
trunk fmt # Format all files
Create a production build:
npm run build # Generate static site
npm run preview # Preview the production build
The election data is stored in data.sqlite3
. There are two ways to add election data:
- Fork this repository
- Add your election data to
load-report.js
- Run the script to update
data.sqlite3
- Submit a pull request
For elections with detailed ballot data:
- Use the
st-louis-cvr/
tools to parse CVR files into SQLite - Generate co-approval matrices and voting pattern analysis
- Export the processed data to the main
data.sqlite3
database - The website automatically displays the rich analysis features
See the st-louis-cvr/README.md
for detailed instructions.
The site automatically deploys to GitHub Pages when changes are merged to the main branch. The deployment process:
- Generates card images using Puppeteer
- Builds the static site
- Deploys to GitHub Pages
This project is licensed under CC-BY-2.0. You may freely distribute and modify the content with attribution.