Skip to content
Senghak Rou
All projects

Machine Learning & Forecasting · Oct – Dec 2025

Temperature and regional electricity use

A team data-science project linking daily temperature to regional electricity consumption (2020–2024): data assembly from RTE and NASA POWER, regional fixed-effects regressions, and predictive models evaluated on a held-out year.

Status
Completed
Setting
Team project (3)ENSAE course project — Python for Data Science, 2025–2026
My role
One of three contributors; my commits include parts of the analysis and visualisation notebook and of the final reports.
Methods and tools
Python · pandas · statsmodels · scikit-learn · GeoPandas · Streamlit

Question and data

How strongly does daily temperature drive electricity consumption in French regions? Daily regional consumption comes from RTE's éCO2mix annual files (2020–2024), and daily weather from the NASA POWER API. This project predates and is separate from my hourly forecasting system, which uses a much stricter evaluation protocol.

Explanatory models

With CitC_{it} the daily consumption of region ii and TitT_{it} its mean temperature (21,924 region-days):

SpecificationTemperature coefficient (MWh per °C)R²
Pooled OLS−5,1630.13
With region fixed effects−5,0710.90

Each additional degree is associated with about 5,000 MWh less daily consumption per region, consistent with heating demand dominating the period. The jump in R2R^2 comes almost entirely from the region effects, which capture persistent differences in regional size.

Daily consumption against temperature, three regions

Mean daily consumption (GWh) in 2 °C bins of daily mean temperature, 2020–2024; bins with fewer than 20 days omitted.

  • Île-de-France
  • Provence-Alpes-Côte d'Azur
  • Bretagne
0100200300400500600-40481216202428Daily mean temperature (°C)Consumption (GWh / day)Île-de-France, -4 to -2 °C: 567 GWh per dayÎle-de-France, -2 to 0 °C: 532 GWh per dayÎle-de-France, 0 to 2 °C: 496 GWh per dayÎle-de-France, 2 to 4 °C: 478 GWh per dayÎle-de-France, 4 to 6 °C: 447 GWh per dayÎle-de-France, 6 to 8 °C: 418 GWh per dayÎle-de-France, 8 to 10 °C: 381 GWh per dayÎle-de-France, 10 to 12 °C: 348 GWh per dayÎle-de-France, 12 to 14 °C: 318 GWh per dayÎle-de-France, 14 to 16 °C: 299 GWh per dayÎle-de-France, 16 to 18 °C: 284 GWh per dayÎle-de-France, 18 to 20 °C: 286 GWh per dayÎle-de-France, 20 to 22 °C: 284 GWh per dayÎle-de-France, 22 to 24 °C: 289 GWh per dayÎle-de-France, 24 to 26 °C: 298 GWh per dayProvence-Alpes-Côte d'Azur, 2 to 4 °C: 295 GWh per dayProvence-Alpes-Côte d'Azur, 4 to 6 °C: 277 GWh per dayProvence-Alpes-Côte d'Azur, 6 to 8 °C: 258 GWh per dayProvence-Alpes-Côte d'Azur, 8 to 10 °C: 240 GWh per dayProvence-Alpes-Côte d'Azur, 10 to 12 °C: 214 GWh per dayProvence-Alpes-Côte d'Azur, 12 to 14 °C: 193 GWh per dayProvence-Alpes-Côte d'Azur, 14 to 16 °C: 181 GWh per dayProvence-Alpes-Côte d'Azur, 16 to 18 °C: 177 GWh per dayProvence-Alpes-Côte d'Azur, 18 to 20 °C: 181 GWh per dayProvence-Alpes-Côte d'Azur, 20 to 22 °C: 192 GWh per dayProvence-Alpes-Côte d'Azur, 22 to 24 °C: 199 GWh per dayProvence-Alpes-Côte d'Azur, 24 to 26 °C: 209 GWh per dayProvence-Alpes-Côte d'Azur, 26 to 28 °C: 219 GWh per dayBretagne, 0 to 2 °C: 186 GWh per dayBretagne, 2 to 4 °C: 169 GWh per dayBretagne, 4 to 6 °C: 157 GWh per dayBretagne, 6 to 8 °C: 149 GWh per dayBretagne, 8 to 10 °C: 137 GWh per dayBretagne, 10 to 12 °C: 123 GWh per dayBretagne, 12 to 14 °C: 109 GWh per dayBretagne, 14 to 16 °C: 98 GWh per dayBretagne, 16 to 18 °C: 96 GWh per dayBretagne, 18 to 20 °C: 96 GWh per dayBretagne, 20 to 22 °C: 95 GWh per dayBretagne, 22 to 24 °C: 99 GWh per day
Data table
Temperature bin (°C)Île-de-France (GWh)Provence-Alpes-Côte d'Azur (GWh)Bretagne (GWh)
-4 to -2567 (22 days)——
-2 to 0532 (36 days)——
0 to 2496 (68 days)—186 (33 days)
2 to 4478 (90 days)295 (34 days)169 (53 days)
4 to 6447 (140 days)277 (109 days)157 (90 days)
6 to 8418 (208 days)258 (193 days)149 (161 days)
8 to 10381 (192 days)240 (245 days)137 (253 days)
10 to 12348 (200 days)214 (187 days)123 (260 days)
12 to 14318 (149 days)193 (159 days)109 (224 days)
14 to 16299 (140 days)181 (144 days)98 (204 days)
16 to 18284 (206 days)177 (134 days)96 (240 days)
18 to 20286 (161 days)181 (136 days)96 (179 days)
20 to 22284 (124 days)192 (129 days)95 (72 days)
22 to 24289 (51 days)199 (163 days)99 (34 days)
24 to 26298 (26 days)209 (110 days)—
26 to 28—219 (63 days)—
Figure 1 · DataConsumption falls as temperature rises until about 17 °C, then flattens, and rises again in Provence-Alpes-Côte d'Azur with air conditioning. The gaps between the curves are the region effects that carry most of the R²; the bend is what a single linear temperature term cannot capture.Source: temp_electricity.csv (repository commit e392934): RTE éCO2mix daily consumption and NASA POWER temperature, 21,924 region-days.

Predictive models

Models trained on 2020–2023 and evaluated on 2024 (a time-ordered split, not a random one), with weather, calendar and region features:

ModelR² on 2024
Linear regression0.93
Ridge regression0.93
Decision tree (depth 4)0.70

Limitations (in hindsight)

  • A high R2R^2 here mostly reflects between-region differences: region effects alone explain about 90 % of the variance. Within-region skill is the more informative measure, and it was not reported separately.
  • The weather inputs are same-day observed values, so this is an explanatory model, not a forecast that could be issued in advance.
  • The notebook prints the mean squared error under the label "RMSE". I report R2R^2 only for that reason.

For forecasts made before the weather and demand are observed, see the separate forecasting project.

Aug – Sep 2026Completed

Forecasting French regional electricity demand

Hourly demand forecasts for 12 French regions, 1 to 24 hours ahead, evaluated under a strict information rule and a test year opened only once.

Machine Learning & Forecasting · Individual · Python, pandas, statsmodels