Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ—ณ๏ธ Bihar Assembly Election ML Model

This project uses machine learning to analyze historical Bihar Vidhan Sabha election data (2000โ€“2020) and predict whether a legislative race will be tight or safe.

๐Ÿ“Œ Project Objective

The aim is to assist political analysts, journalists, and data scientists by providing a predictive model that classifies election races based on:

  • Voter turnout
  • Party affiliation
  • Constituency type (General/SC/ST)
  • Margin and percentage of victory
  • Total electors and votes polled

๐Ÿ“‚ Project Structure

โ”œโ”€โ”€ app.py # Flask web app โ”œโ”€โ”€ election_race_model.pkl # Trained machine learning model โ”œโ”€โ”€ IndiaVotes_Bihar.csv # Historical election data (2000โ€“2020) โ”œโ”€โ”€ templates/ # HTML templates for the web app โ”œโ”€โ”€ .gitignore โ””โ”€โ”€ README.md # Project documentation (this file)

๐Ÿš€ How to Run Locally

1. Clone the repository

git clone https://github.com/Vivek-ML001/BiharElection.git
cd BiharElection

2. Install dependencies

Make sure Python is installed. Then run:

pip install -r requirements.txt

> If requirements.txt is not available, use:



pip install pandas scikit-learn flask

3. Run the app

python app.py

Then open your browser at http://127.0.0.1:5000

 ๐Ÿ“Š Model Details

Algorithm: (e.g., Random Forest, Logistic Regression)

Target Label: Tight Race vs Safe Seat

Input Features: Voter Turnout, Party, Constituency Type, Margin %, etc.


โœจ Future Improvements

Add visual analytics dashboard

Integrate real-time data scraping

Improve accuracy using ensemble models

Deploy on cloud (Render/Heroku/AWS)


๐Ÿ“ฎ Contact

Made by Vivek Kumar | GitHub Profile


---

About

๐Ÿ“Š Bihar Assembly Election ML Model This project analyzes historical Bihar Vidhan Sabha election data (2000โ€“2020) to predict whether a legislative race will be tight or safe. Using machine learning techniques, the model considers features like voter turnout, party affiliation, constituency details, and margin of victory

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages