Context: Data-science project for the Data Analysis (ANADI) course at ISEP, 2024/25. Analyses real Portuguese grid data to answer an energy-transition question — and ships the result as an interactive bilingual dashboard. Data source: E-REDES open data.
Can we charge more electric vehicles without building new grid infrastructure?
This project investigates whether replacing traditional public street-lighting (sodium/mercury) with LED technology frees enough electrical capacity in Distribution Transformer Stations (PTD/DTS) to support new 22 kW EV charging stations. It takes two raw E-REDES datasets through a full data-science pipeline — cleaning, exploratory analysis, statistical inference, and predictive modeling — and presents the findings in an interactive dashboard.
- Exploratory Data Analysis of public-lighting consumption and transformer-station capacity.
- Statistical inference (hypothesis testing) on lighting efficiency and grid utilization.
- Predictive / regression modeling (statsmodels) to estimate released capacity and EV-readiness.
- Released-capacity model combining LED efficiency gains with transformer slack to judge viability.
- Interactive dashboard (Plotly Dash) with two analytical views, switchable EN / PT.
| Area | Tools |
|---|---|
| Language | Python 3.10+ |
| Data wrangling | pandas, numpy, openpyxl |
| Statistics / modeling | scipy, statsmodels |
| Visualization | matplotlib, seaborn, plotly |
| Dashboard | Plotly Dash (modular package: data / calculations / layout / callbacks) |
| Notebooks | Jupyter / JupyterLab |
| Notebook | Focus |
|---|---|
notebooks/4.3.Data_AnalysisExploration.ipynb |
Exploratory data analysis |
notebooks/4.4.Statistical Inference.ipynb |
Hypothesis testing & inference |
notebooks/4.5.Predictive Modeling.ipynb |
Regression / predictive modeling |
| Metric | Formula |
|---|---|
| Released power (LED) | ΔP_LED = P_IP_inefficient × 0.65 |
| Grid slack | P_slack = (Cap_PTD × 0.92) × (1 − Util_avg) |
| EV load | P_EV = N_PTD × 22 kW × 0.60 |
| Viability balance | D = P_slack + ΔP_LED − P_EV |
A positive D means the released + freed capacity covers the new EV demand without grid reinforcement.
# 1. Clone and enter
git clone https://github.com/AmirMasnavi/GridLightEV
cd GridLightEV
# 2. Set up environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# 3. Run the interactive dashboard (needs IP_data.xlsx and PTD_data.xlsx in the project root)
python run_dashboard.py # then open http://127.0.0.1:8050
# 4. Or explore the analysis
jupyter labGridLightEV/
├── run_dashboard.py # Dashboard entry point
├── dashboard/ # Plotly Dash app (data, calculations, config, layout, callbacks)
├── notebooks/ # EDA → inference → predictive modeling
├── docs/ # Methodology, data dictionary, architecture, requirements
├── IP_data.xlsx # Raw: public-lighting inventory (E-REDES)
├── PTD_data.xlsx # Raw: transformer stations (E-REDES)
└── requirements.txt
See docs/ for the full methodology, data dictionary, and architecture notes.
- LinkedIn: Amir Masnavi
- Portfolio: AmirMasnavi.github.io