Production-style Streamlit dashboard for exploring global EV charging infrastructure with Plotly and PyDeck.
The repo is structured as a package (src/), with automated checks (Ruff) and a test suite (Pytest).
This dashboard explores the Global EV Charging Stations & Models Dataset (2025):
- 🌍 242k+ charging stations across 121 countries
- 🎛️ Filters: country, power class, fast-DC, ports
- 📊 KPIs and distribution insights (including Lorenz curve + Gini)
- 🗺️ Interactive world map with clustering
- 🧮 Allocation optimizer for fast-DC expansion scenarios
📦 Dataset repository:
- 🎛️ Country/city/power-class filters
- 📈 KPIs: total stations, ports, avg kW, fast-DC share
- 📊 Visuals: donut charts, bar charts, Lorenz curve + Gini
- 🧮 Optimizer: simulate allocation of new fast-DC ports
- 🧭 Compare mode: selected slice vs global
.
├── app.py
├── src/ev_charging_dashboard/
│ ├── analytics.py
│ ├── data.py
│ ├── services.py
│ └── ...
├── tests/
├── assets/
├── requirements.txt
├── requirements-dev.txt
└── pyproject.toml
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -U pip
python -m pip install -r requirements.txt
streamlit run app.pyNotes:
requirements.txtinstalls the local package in editable mode (-e .) soev_charging_dashboardimports work out of the box.- If PowerShell blocks activation:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
The app auto-loads the dataset from the public GitHub raw CSV by default.
You can override the data source in any of the following ways (highest priority first):
- 🔗 Query param:
?csv=<path_or_url> - 🔐 Streamlit secrets (
.streamlit/secrets.toml):
DATA_URL = "https://raw.githubusercontent.com/tarekmasryo/Global-EV-Charging-Stations/main/data/charging_station.csv"- 🌱 Environment variables (first one found is used):
CSV_URL,CSV_PATH,DATA_URL
Optional enrichment files:
- 🌐
world_population.csv - 🧭
country_region.csv
If these files are not present, related enrichment metrics will be skipped gracefully.
- Push this repository to GitHub.
- Create a new Streamlit Cloud app from the repo.
- Set
DATA_URLin Streamlit Secrets (recommended), or rely on the default auto-load URL.
Install dev tools:
pip install -r requirements-dev.txt
pre-commit installRun checks:
ruff check .
ruff format .
pytest -q- ✅ Code: Apache-2.0 (see
LICENSE) - ✅ Dataset: hosted in the dataset repository (see link above)
If you use the dashboard or dataset, please credit:
Global EV Charging Dashboard and Dataset by Tarek Masryo.




