An end-to-end EV infrastructure analytics project that analyzes charging demand, identifies priority investment cities, and visualizes infrastructure gaps across city-level EV markets
Live Demo • Features • Usage • Screenshots • Power BI Dashboard
- Introduction
- Features
- Tech Stack
- Installation
- Configuration
- Usage
- How It Works
- Project Structure
- Database & SQL Views
- Function Reference
- Screenshots
- Power BI Dashboard
- Future Enhancements
- Contact
EV Charging Infrastructure Demand Analysis is a premium dark-theme analytics project designed to study EV adoption, charging infrastructure adequacy, and investment priority across European city-level markets. The solution combines a Streamlit dashboard, MySQL database, SQL analytical views, CSV-based exploration, and a Jupyter notebook workflow to support smarter charging network expansion.
The project follows a practical analytics pipeline: EV data is loaded from CSV → cleaned and standardized → stored in MySQL → queried through reusable SQL views → presented in an interactive Streamlit dashboard with KPIs, filters, trends, maps, and downloadable insights.
- 14,120+ records in the provided EV dataset
- 27 analytical fields covering EV demand, station density, coverage gap, growth, and priority score
- 8 dashboard sections including overview, priority cities, trends, geography, feature intelligence, SQL insights, forecast, and about
- 6 SQL analytical views for business-ready EV infrastructure insights
- Premium NVIDIA-inspired UI with black + neon green theme styling
- CSV export support for filtered records and priority city summaries
- 4-page Power BI dashboard (Executive Overview, Infrastructure & Priority, Growth & Forecasting, Country Analysis) with a matching dark "EV Command" theme
| Feature | Description |
|---|---|
| Interactive Dashboard | Streamlit dashboard with premium dark UI and interactive controls |
| Priority City Analysis | Ranks cities using priority_score, coverage_gap, and EV demand indicators |
| Infrastructure Gap Detection | Highlights underserved cities with charging shortages |
| Trend Analysis | Tracks monthly and yearly EV growth patterns across countries |
| Geographic Visualization | Interactive city-level map for EV and charging metrics |
| SQL Insights Layer | Six analytical views transformed into dashboard-ready business insights |
| Forecast Support | Optional forecast tab when compatible forecast files are available |
| Data Export | Download filtered dataset and priority-city outputs as CSV |
- Dark Premium Theme with black and neon-green design language
- Executive KPI Cards for EV demand, infrastructure availability, and coverage gaps
- Advanced Sidebar Filters for geography, timeline, city tier, infrastructure status, and EV-per-station stress
- Map-based Analytics using latitude/longitude city points
- Interactive Plotly Visuals including bar, line, pie, bubble, and map charts
- Download Actions for quick export of filtered business insights
- Overview Analytics for market-level KPIs and infrastructure health
- Priority Cities Ranking to identify top investment opportunities
- Trend Monitoring for month-on-month and year-over-year EV growth
- Feature Intelligence to understand demand-driving variables
- SQL Business Questions answered through reusable database views
- Forecast-ready Architecture for future-demand extension
- Python 3.9+
- Pandas / NumPy — data processing and transformation
- Scikit-learn — feature intelligence and model-style analysis
- SQLAlchemy — database engine integration
- PyMySQL — MySQL connectivity
- python-dotenv — environment variable management
- Streamlit — interactive dashboard framework
- Plotly — advanced charts and geo visualizations
- Matplotlib / Seaborn — supporting visualization ecosystem
- Custom HTML/CSS — premium dashboard cards and layout styling
- MySQL 8.0+ — EV analytics storage layer
- SQL Views — reusable business insight layer
- Power BI — 4-page executive dashboard (Overview, Infrastructure & Priority, Growth & Forecasting, Country Analysis) for stakeholder-facing storytelling alongside the Streamlit app
- Jupyter Notebook — exploratory analysis and experimentation
- CSV Dataset Pipeline — direct local dataset support
- Optional Forecast Inputs — extend dashboard with predictive visuals
# Python 3.9+
python --version
# MySQL 8.0+
mysql --version
# pip
pip --versiongit clone https://github.com/yourusername/ev-charging-demand-analysis.git
cd ev-charging-demand-analysisReplace the repository URL with your actual GitHub repository link.
# Windows
python -m venv venv
venv\Scripts\activate
# Linux / Mac
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtapp.py
db_connection.py
ev_charging_analysis.sql
europe_ev_dataset.csv
requirements.txt
Create a .env file in the root directory.
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_password_here
MYSQL_DATABASE=ev_charging_analysismysql -u root -p < ev_charging_analysis.sqlOr initialize the schema using the Python helper functions from db_connection.py.
streamlit run app.pyThe dashboard can work with the following files:
europe_ev_dataset.csv— main EV charging analysis datasetforecast.csv— optional forecast file for future demand chartsmodels_summary.csv— optional model / evaluation summary
streamlit>=1.32.0
pandas>=2.0.0
numpy>=1.24.0
plotly>=5.18.0
matplotlib>=3.7.0
seaborn>=0.12.0
scikit-learn>=1.3.0
python-dotenv>=1.0.0
PyMySQL>=1.1.0
sqlalchemy>=2.0.0
- The project uses PyMySQL for MySQL connectivity
- Environment variables are loaded through python-dotenv
- Default database name is
ev_charging_analysis - The helper module can create schema and upload CSV data into MySQL
Use this section to monitor:
- Total EV registrations
- Total charging stations
- Average coverage gap
- Country-level infrastructure health
Use this section to identify:
- High-priority EV charging investment markets
- Cities with strong demand pressure
- Bubble comparison of EV demand vs infrastructure availability
- Exportable priority-city summaries
Analyze:
- Month-on-month EV growth
- Year-over-year EV growth
- Country-wise trend comparisons
- Demand momentum across selected markets
Explore city-level EV infrastructure using:
- EV registrations
- Charging stations
- Coverage gap
- Demand and priority metrics
Understand which variables are most associated with EV registrations and demand patterns using feature-importance style analysis.
View reusable SQL-driven insights such as:
- Top Priority Cities
- Monthly MoM Growth
- Infrastructure Status Profile
- Charging Deserts
- City Tier Gap
- YoY Growth
If forecast.csv is available, this tab can display:
- Forecasted EV demand trends
- Country-wise forecast comparison
- Confidence interval style ranges
Summarizes project goal, dataset context, tech stack, and portfolio-ready value.
CSV Dataset
↓
Data Cleaning / Standardization
↓
MySQL Database Table (`ev_data`)
↓
SQL Analytical Views
↓
Streamlit Dashboard
↓
Insights, Rankings, Filters, Maps, and Downloads
The app loads EV data from the project directory and uses local CSV inputs as the primary source.
Country labels, city tiers, and infrastructure status values are normalized for better filtering and chart consistency.
Users can filter by country, year range, city tier, infrastructure status, and charging stress level.
MySQL stores the data in ev_data, while SQL views answer recurring business questions.
The dashboard builds country summaries, city rankings, growth views, map analytics, and feature intelligence outputs.
Filtered datasets and priority-city summaries can be exported directly from the dashboard.
ev-charging-demand-analysis/
│
├── app.py
├── db_connection.py
├── ev_charging_analysis.sql
├── europe_ev_dataset.csv
├── EV_Charging_Analysis.ipynb
├── requirements.txt
├── .env
├── .gitignore
├── README.md
│
├── Screenshots/
│ ├── Project/
│ │ ├── overview.png
│ │ ├── priority-cities.png
│ │ ├── trends.png
│ │ ├── geography.png
│ │ ├── sql-insights.png
│ │ └── forecast.png
│
├── Power BI Dashboards/
│ ├── EV_Charging_Infrastructure_Power_BI_Dashboard.pbix
│ └── Screenshots/
│ ├── 1_Executive_Overview.png
│ ├── 2_Infrastructure___Priority_Analysis.png
│ ├── 3_Growth___Forecasting.png
│ └── 4_Country_Analysis.png
│
└── optional/
├── forecast.csv
└── models_summary.csv| File | Description |
|---|---|
app.py |
Main Streamlit dashboard application |
db_connection.py |
MySQL helper for schema creation and CSV upload |
ev_charging_analysis.sql |
Database schema and analytical SQL views |
europe_ev_dataset.csv |
Main EV charging analysis dataset |
EV_Charging_Analysis.ipynb |
Notebook for analysis and experimentation |
requirements.txt |
Python dependencies |
.env |
Local environment variables for MySQL |
Screenshots/ |
Folder for Streamlit dashboard screenshots |
Power BI Dashboards/ |
Power BI .pbix file and its dashboard screenshots |
Stores city-level EV and infrastructure metrics such as:
- Country / state / city
- Year / month
- Population and density
- EV, BEV, and PHEV registrations
- Charging stations and charging points
- EV-per-station ratio
- Coverage gap
- Demand score
- Priority score
- Infrastructure status
- City tier
- EV market share and adoption stage
| View | Purpose |
|---|---|
v_top_priority_cities |
Finds cities with the highest average priority score |
v_monthly_mom_growth |
Tracks month-over-month EV growth by country |
v_infra_status_profile |
Profiles infrastructure groups by gap and priority |
v_charging_deserts |
Highlights the most underserved charging markets |
v_city_tier_gap |
Compares coverage gaps across city tiers |
v_yoy_ev_growth |
Compares EV growth with charging station growth |
SELECT *
FROM v_top_priority_cities
ORDER BY avg_priority_score DESC
LIMIT 10;test_connection()— validates MySQL connectivityget_engine()— returns a SQLAlchemy engineensure_schema(verbose=True)— creates the database, table, and analytical viewsupload_csv_to_mysql(csv_path)— loads CSV data into MySQL after resetting the main table
- Dataset loading from CSV-based sources
- Country and city summary generation
- Monthly trend aggregation
- Feature intelligence / model-style insight support
- Forecast preparation when optional files are present
Screenshots below are taken from the live Streamlit deployment. Click the Live Demo link above to explore the interactive dashboard.
A 4-page, dark-themed Power BI companion dashboard — built around a consistent "EV Command" navigation console — gives stakeholders a click-and-filter BI experience alongside the Streamlit app. Every page shares the same sidebar (Executive Overview · Infrastructure & Priority Analysis · Growth & Forecasting · Country Analysis · Reports · Settings) and global filters for Year, Country, and City Tier.
File: EV_Charging_Infrastructure_Power_BI_Dashboard.pbix
| Page | What it shows |
|---|---|
| ⚡ Executive Overview | Market-wide KPIs — total EV registrations, cities, charging stations, average EVs per station, and average coverage gap — plus an infrastructure-priority callout, city-by-country and registration-by-country breakdowns, monthly registration trend, and an infrastructure-status donut |
| 🏗️ Infrastructure & Priority Analysis | A Bing map plotting every city colored by infrastructure status, the Top 10 priority cities ranked by priority score, coverage gap by infrastructure status, and average priority score by status |
| 📈 Growth & Forecasting | Latest EV growth %, station growth %, EVs-per-station, and registration KPIs, with 2021–2025 trend lines for charging infrastructure growth, EV growth rate by year, registration growth, and the EVs-per-station ratio over time |
| 🌍 Country Analysis | Country-level KPIs with Top 10 country rankings by registrations, charging stations, and coverage gap, average coverage gap by country, an infrastructure-status donut, and a sortable country performance summary table |
Tracks 792.53K total EV registrations across 227 cities and 9.13M charging stations, with an average of 56.05 EVs per station and a 35.57 average coverage gap. A priority callout flags that 75% of markets need infrastructure expansion, backed by city and registration breakdowns for Germany, the Netherlands, the UK, Spain, France, and Italy, a monthly registration trend line, and an infrastructure-status donut (Needs Attention 40.68% · Critical Gap 34.17% · Adequate 25.15%).
An interactive map plots every city colored by infrastructure status (Adequate / Critical Gap / Needs Attention), paired with a Top 10 Priority Cities ranking (led by Brașov, Cluj-Napoca, and Iași), coverage gap by infrastructure status, and average priority score by status — cities marked Critical Gap average a priority score of 48, more than double Needs Attention (18) and Adequate (10).
Surfaces the latest momentum — 19.36% EV growth, 21.09% charging-station growth, 55.55 EVs per station, and 33.69K registrations — alongside 2021–2025 trends for charging infrastructure growth, year-over-year EV growth rate, registration growth, and a steadily declining EVs-per-station ratio, signaling that station rollout is starting to outpace demand.
A country-level drill-down (filterable by City Tier, shown here for Tier 2) covering 279.02K registrations across 24 countries, with Top 10 country rankings by registrations, charging stations, and coverage gap, average coverage gap by country (Romania and Poland lead), an infrastructure-status donut, and a full country performance summary table.
- Add advanced forecast models and evaluation comparison
- Add clustering for city segmentation
- Add anomaly detection for infrastructure stress
- Add PDF / report export
- Add dashboard modularization for maintainability
- Add unit tests and data validation checks
- Add Docker and cloud deployment support
- Add direct Power BI link integration
Sumersing Patil
- 💼 LinkedIn: Sumersing-patil
- 🐙 GitHub: Sumersingpatil2694
- 📧 Email: [email protected]
- Repository: GitHub repo
- Live Demo: Streamlit Live Demo
- Power BI Dashboard: Power BI
- Streamlit — interactive dashboard framework
- Plotly — advanced charting and geo visualizations
- MySQL — structured analytics storage layer
- Pandas / NumPy / Scikit-learn — Python analytics ecosystem
- Power BI — stakeholder-friendly BI storytelling









