Giter Club home page Giter Club logo

2023-election-app's Introduction

2023-election-app

Web app that visualizes the votes distribution of the 2023 Polish parliamentary election.

preview.mp4

preview-mobile.mp4

About

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

Tech used

HTML CSS JavaScript JavaScript chartjs leaflet Python Flask pandas sqlalchemy MySQL

How it works

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

How it's made

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

Data integrity

Here are some screenshots comparing my results with the official ones. For majority of cases they should check out.

wwa sowin

lomianki plock

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.