A web dashboard visualizing the alignment between Swiss political institutions (Parliament, Bundesrat, political parties) and the Swiss public, based on data from the Swissvotes dataset.
Developed as part of a student project at Berner Fachhochschule (BFH).
- Visualizations showing agreement between institutions and public votes
- Party and canton-based filtering
- Choropleth map of cantonal representation
- Multilingual UI (DE, FR, IT, EN)
- Automated daily data fetching from Swissvotes
Frontend (Vue 3 + Vite + D3)
- Vue 3, Vue Router, Vue I18n
- D3.js for data visualization
- Tailwind CSS for styling
- TypeScript
Backend
- Node.js, Express
- PostgreSQL (with Docker)
- Axios, csv-parser, node-cron
- TypeScript + Vitest
This deployment works on macOS, Linux, and Windows (via Git Bash or WSL).
On macOS, the script uses Colima instead of Docker Desktop. Colima is automatically installed if Docker is not already running, making the setup lightweight and M1/M2-compatible. Colima is a container runtime for macOS that replaces Docker Desktop and integrates well with the Docker CLI.
curl -O https://raw.githubusercontent.com/damian-lienhart/political-representation-dashboard/main/deploy-server.shchmod +x deploy-server.sh./deploy-server.shWindows users: Please use Git Bash or WSL (Windows Subsystem for Linux) to run the script. Do not run it in Command Prompt or PowerShell.
Frontend: http://localhost:8080
Backend API: http://localhost:3000/api
The backend automatically fetches updated vote data every 4 hours using a cron job.
To manually trigger a data update:
docker-compose exec backend npm run update-dataCreate a snapshot of the PostgreSQL data:
docker-compose exec db pg_dump -U postgres political_dashboard > backup.sqlThis project uses data from the Swissvotes dataset, which is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.
Source: Swissvotes (2024), Année Politique Suisse, University of Bern.
This dataset is regularly accessed via automated fetches. For the most recent access date, refer to the backend logs.
- Damian Lienhart
- Sujal Singh Basnet
- Project supervised by Dr. Simon Kramer (BFH)
This project is licensed under the MIT License – see LICENSE for details.
All dependencies are open source and MIT-compatible – see package.json for exact versions.
Note: While this codebase is MIT-licensed, it integrates open government data under CC BY 4.0. If you reuse this project and include the data, please ensure you also comply with the attribution terms of the Swissvotes dataset.