Web app that visualizes the votes distribution of the 2023 Polish parliamentary election.
preview.mp4
preview-mobile.mp4
This repo showcases a simple web-app project I've made on the side. It's all about visualising the 2023 Parliamentary election data available @wybory.gov.pl/sejmsenat2023/.
- The user searches for a place name via the searchbar with categories to choose from: 'Address', 'City', 'Gmina', 'Powiat', 'Wojewodztwo' and gets nice charts in return.
- The place location is visualised on a map.
- Note that lookup for category 'Address' provide results for the exact building in which the voting took place, so for e.g 'Szkola Podstawowa xxx' (see here).
- Data from abroad / ships was excluded.
- I downloaded the original .csv files and parsed them to make a relational database. Used Pandas and MySQL, see the ERD here.
- /data/ directory is where i do the parsing / database insertions with SQLAlchemy.
- Made a Flask server with endpoints that enable looking up places and their corresponding voting results, again, used SQLAlchemy and AJAX for this.
- Used Nominatim API for place location and GeoJSON data fetching, which is then represented on a Leaflet map.
- Used Chart.js for charts.
- Made it somewhat responsive with CSS Flexbox.
Here are some screenshots comparing my results with the official ones. For majority of cases they should check out.