https://github.com/neuraladitya/electric_vehicle_sales_predictor
EV Sales Prediction in India using Machine Learning. Forecasts electric vehicle sales across Indian states with interactive visualizations and a modern web UI.
https://github.com/neuraladitya/electric_vehicle_sales_predictor
dashboard data-science data-visualization electric-vehicles ev-sales flask india machine-learning matplotlib prediction-model python random-forest sales-analysis
Last synced: about 2 months ago
JSON representation
EV Sales Prediction in India using Machine Learning. Forecasts electric vehicle sales across Indian states with interactive visualizations and a modern web UI.
- Host: GitHub
- URL: https://github.com/neuraladitya/electric_vehicle_sales_predictor
- Owner: NeuralAditya
- Created: 2025-04-18T19:29:51.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-18T19:45:56.000Z (6 months ago)
- Last Synced: 2025-04-24T00:58:29.179Z (6 months ago)
- Topics: dashboard, data-science, data-visualization, electric-vehicles, ev-sales, flask, india, machine-learning, matplotlib, prediction-model, python, random-forest, sales-analysis
- Language: Python
- Homepage:
- Size: 661 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# β‘ Electric Vehicle Sales Predictor β India

















---
## π Overview
A **machine learning-powered web app** that predicts **electric vehicle (EV) sales** in **Indian states** based on user input features.
This dynamic **web application** predicts electric vehicle (EV) sales trends using a **custom-trained machine learning model**. Users can **upload new datasets**, **train or retrain models** directly from the dashboard, and explore **powerful insights** through **interactive visualizations** and **downloadable reports**. Built for **analysts, policy makers, and auto manufacturers** to decode the future of EV marketsβstate by state, type by type, and over time.
## π· UI Preview
1. Dashboard :

2. Prediction Page :

## π― Prediction Output Screenshot
Hereβs a sample output :

---
## π Features
### π― Add-Ons Like Never Before
1. Dynamic Dropdowns auto-filled from dataset (vehicle types, classes, brands, etc.)
2. Light/Dark Mode switch for better accessibility and modern feel
3. Real-time graph updates post prediction or training
4. Upload your own CSV to retrain the model from the dashboard### π EV Sales Prediction
- Inputs:
- Vehicle Type
- Brand/Model
- State
- Year- Uses a trained model to predict EV sales volume
### π Dynamic Visualizations
Graphs include:
- EV Sales by State
- EV Sales Trends over Years
- Vehicle Type Distribution
- Brand-wise Sales Share (Future)
- Correlation Matrix (Future)
- Custom graphs rendered from user selection (Future)### π οΈ Model Management
- Train new models using uploaded .csv via the dashboard
- Upload new training data directly
- Train model on-the-fly with one click
- Models saved as .pkl files for future predictions### π PDF Report
- Downloadable report with:
- Prediction result
- Embedded analysis graphs
- Copyright---
## π§ Tech Stack
| Layer | Tech |
|--------------|-------------------------------------------|
| Backend | Python, Flask |
| ML/Processing| scikit-learn, pandas, NumPy |
| Text Features| TF-IDF Vectorization |
| Visualization| matplotlib, seaborn |
| Frontend | HTML, CSS, JavaScript (custom styles) |---
## ποΈ Project Structure
```
ELECTRIC_VEHICLE_SALES/
β
βββ app.py
βββ train_model.py
βββ extract_dropdown_data.py
βββ graphs.py
βββ requirements.txt
β
βββ data/
β βββ EV_sales_india.csv
β
βββ model/
β βββ model.pkl
β βββ features.pkl
β βββ dropdown_data.pkl
β
βββ static/
β βββ styles.css
β βββ graphs.css
β βββ graphs/
β βββ *.png
β
βββ templates/
β βββ index.html
β βββ result.html
β βββ dashboard.html
β
βββ README.md
```---
## π How to Run the App
1. Install dependencies:
```bash
pip install -r requirements.txt
```2. Create these folders and files:
```bash
create model folder
create model.pkl , features.pkl & dropdown_data.pkl
keep all .pkl files empty
(req to save trained models)
```3. Train the model (Optional):
```bash
python train_model.py
```4. Run the Flask app:
```bash
python app.py
```5. Open browser at:
```
http://localhost:5000
```
---## π Example Workflow
1. Open the app in browser
2. Select vehicle, state, year, etc.
3. Click Predict
4. View results and interactive charts
5. Head to Dashboard tab to:
- Upload new data
- Retrain model
- Refresh dropdowns---
## π¨βπ» Developer
Made with β€οΈ by [Aditya Arora](https://www.linkedin.com/in/NeuralAditya)
Β© 2025 Aditya Arora. All rights reserved.---