This project estimates the public EV charging demand across different regions in Washington State using regression and classification models. It involves preprocessing raw EV registration data, training ML models, and deploying an interactive Streamlit application.
Goal: Predict electric vehicle demand using regression (EV count) and classification (charging demand level). Data Source: Washington State EV Registration Dataset Tech Stack: Python, pandas, scikit-learn, Streamlit, SHAP, Folium, Kepler.gl
Raw dataset columns included vehicle model details, city, postal code, base MSRP, range, and fuel type. We performed the following:
Cleaning & Feature Engineering
- Filtered for electric vehicles only
- Standardized numeric features:
- avg_electric_range
- bev_ratio (ratio of battery electric vehicles)
- avg_base_msrp
- Calculated regional aggregates per ZIP code
- Mapped ZIP codes to geographic coordinates (latitude & longitude)
Data Visualizations (Exploration)
- Top 20 cities by number of EVs
- Feature impact on regression model using SHAP
- Heatmap of EV concentration in Washington using Folium

- Interactive EV density map using Kepler.gl

- Regression Model
- Target:
ev_count(number of EVs in ZIP code) - Algorithms: Linear, Ridge, Lasso, Random Forest, XGBoost
- Features: Standardized numeric inputs + latitude, longitude
- Classification Model
- Target:
demand_level(High, Medium, Low) - Algorithms: Logistic, KNearest Neighbors, Decision Tree, Random Forest, XGBoost
- Model Performance
- MAE, RMSE for regression
- Accuracy, F1-Score for classification
Key Features
-
Toggle between Regression and Classification mode
-
User inputs via sliders/dropdowns:
- ZIP Code
- Avg Electric Range (mi)
- BEV Ratio (0-1)
- Avg Base MSRP ($)
-
Automatic latitude/longitude lookup from ZIP code
-
Model output:
- EV Count (Regression)
- Demand Level (Classification)
-
Display raw and standardized inputs for transparency
How It Works
- User selects a ZIP code and adjusts input features.
- The app retrieves geolocation (lat/lon) for that ZIP.
- Inputs are standardized using training stats.
- Prediction is made using the loaded .pkl model.
- Output is shown with both input data and prediction.
- ZIP codes with higher EV counts are concentrated around Seattle, Bellevue, and Redmond
- MSRP and BEV Ratio strongly influence EV population
- Location (latitude, longitude) is critical in determining demand
- Incorporate external charging station data for validation
- Add temporal analysis based on vehicle registration dates
- Deploy the model to cloud (e.g., Streamlit Community Cloud)