A Python-Flask web app for analysing elections.
https://eas.westhatchcss.tech
EAS is a web app that allows you to analyse elections with ease through an intuitive graphical interface. It automates the process of sourcing, calculating, abstracting, and visually presenting electoral statistics.
EAS relies heavily on ElectionGuide to source its data. This project would not be possible without their contributions.
I plan to eventually deploy the app on a Raspberry Pi server, once the first prototype is complete.
This project also serves as my coursework for the OCR A Level Computer Science NEA. As a result, I cannot accept contributions until after it has been submitted. However, feel free to clone and experiment with the EAS for your own learning.
For a limited time only, the EAS will also be hosted on a web server negating the need for any of this.
EAS isn’t designed for small screens (e.g. phones). Please use a larger device for the best experience.
To run EAS, you will need:
- Python 3.x with pip
- An ElectionGuide API token (although a cached database has been included)
Dependencies will be installed during the setup process.
Note: At the time of writing, the project is launchable but only some features are present!
To set up EAS, clone the repository and use a virtual environment. (You may need to use python3
depending on your system configuration.)
-
Clone the repository:
git clone https://github.com/doctorisyes/Electoral-Analysis-System.git cd Electoral-Analysis-System
-
Create the virtual environment:
python -m venv venv
-
Activate the virtual environment: Command is different for Windows users!
source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the program:
python main.py
-
Go to this page into your browser:
The backend uses the following libraries:
- Flask
- requests
- Chart.js (More to be added as the project develops.)
As this project is coursework, I cannot accept contributions until it has been submitted to OCR.
This repository uses the Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) license.
Samuel Douek – @doctorisyes