Skip to content
AI.info

Research

DemandCast: Global hourly electricity demand forecasting

Overview Research area: Machine learning for energy systems — specifically, data-driven forecasting of hourly electricity demand at global scale. Technical level: Intermediate. The paper assumes famil

DemandCast: Global hourly electricity demand forecasting
arXiv
2510.08000
Published
2025-10-09
Authors
Kevin Steijn, Vamsi Priya Goli, Enrico Antonini

AI summary

Overview

Research area: Machine learning for energy systems — specifically, data-driven forecasting of hourly electricity demand at global scale.

Technical level: Intermediate. The paper assumes familiarity with supervised machine learning concepts such as gradient boosting, train/validation/test splits, and error metrics, but the methodology is described in accessible terms.

Scope: The paper introduces DemandCast, an open-source XGBoost-based framework that forecasts normalized hourly electricity demand profiles for 56 countries and their subdivisions using historical demand, weather, and socioeconomic data.

What This Paper Is About

Energy system planners need to know how much electricity will be demanded, where, and when, but many countries lack the high-resolution historical demand data required to build reliable forecasting models. DemandCast addresses this by training a machine learning model on a large multi-country, multi-year dataset of hourly demand, temperature, and socioeconomic indicators, so that demand profiles can be forecast even for regions with limited historical records or for exploring future scenarios. To make this work across regions with different demand magnitudes, the model predicts demand as a fraction of annual consumption rather than in absolute megawatts.

Key Contributions

  1. A normalized forecasting target: The authors define a normalized demand variable D_n(t) that expresses hourly demand as a fraction of annual demand, adjusted for the fraction of hours actually observed in the year. This forces the model to learn temporal shape rather than absolute magnitude, and lets absolute demand be reconstructed in post-processing by scaling the predicted profile with annual demand estimates.
  2. A large, harmonized, multi-source dataset: DemandCast combines historical hourly or sub-hourly electricity demand (compiled via the openly accessible Awesome Electricity Demand repository), gridded hourly temperature from the Copernicus ERA5 reanalysis dataset, gridded population data from the Socioeconomic Data and Applications Center, gridded GDP per capita from global economic databases, and country-level annual electricity demand per capita estimates. All time series are standardized to UTC timestamps and megawatts.
  3. Expanded temporal and geographic coverage: Where prior studies relied on demand data from a single year (2015) covering 44 countries, DemandCast incorporates data spanning 2000 to 2025 (where available) and increases geographic representation to 56 countries, including subdivisions for large nations such as the United States, Canada, Mexico, Brazil, and Australia.
  4. A fully reproducible, open-source end-to-end pipeline: Modular data pipelines handle collection, pre-processing, and harmonization, with a temporal data-splitting strategy that reserves the most recent years for validation and testing to benchmark genuine out-of-sample performance.

Main Findings

  • Average out-of-sample error of 9.2%: Across all regions in the test set, the model achieved an average mean absolute percentage error (MAPE) of 9.2%. The paper reports this as comparable to previous studies, which reported a MAPE of around 8%, albeit using smaller training datasets and less diverse regions.
  • Training scale: The XGBoost model was trained on 6,041,222 hourly electricity demand observations, with 731,538 observations used for validation and 662,369 for testing.
  • Data split proportions: The final available year of demand data for each region was reserved for testing (8.91% of the dataset), the second-to-last year for validation (9.84%), and all remaining years formed the training set (81.25%).
  • Error varies widely by region: The reported average MAPE values are 0.0878 for training, 0.0966 for validation, and 0.0920 for testing. Across the individual regions listed in the appendix, test MAPE ranges from a minimum of 0.0234 to a maximum of 0.1936; training MAPE ranges from 0.0512 to 0.2078, and validation MAPE from 0.0418 to 0.4397.
  • Heterogeneous data availability drives uneven performance: Some countries contribute extensive multi-year training histories while others are represented by relatively short time spans, which the authors identify as a likely source of uneven geographic performance.
  • No uncertainty quantification: The current model architecture cannot quantify predictive uncertainty, a limitation the authors flag as particularly relevant for long-term planning.

Methodology in Plain English

The researchers gathered three families of data: historical electricity demand, weather, and socioeconomic indicators. Demand data came from a repository the team built to compile public hourly and sub-hourly datasets; retrieval modules harmonize each time series to UTC timestamps and megawatts. Temperature came from the ERA5 reanalysis dataset, with features derived from the top one and top three most populous grid cells, plus monthly averages and rankings to capture seasonal variation. Population, GDP per capita, and annual electricity demand per capita provided broader socioeconomic context.

Rather than predicting raw megawatts directly, the model predicts each hour's demand as a share of that year's total demand, correcting for how many hours of data were actually available. This makes regions of very different sizes comparable and lets the model focus on daily, weekly, and seasonal patterns. To recover absolute demand, the predicted shape is multiplied back by an estimate of annual demand.

The model itself is XGBoost, a gradient boosting algorithm that has shown strong performance in prior high-resolution national demand forecasting work. Evaluation uses a chronological split: for each region, the last available year is held out for testing, the year before that for validation, and all earlier years are used for training. This guarantees the reported errors reflect performance on years the model never saw.

Why This Matters

Impact on research: The paper pushes machine learning demand forecasting from a single-year, 44-country basis to a multi-year (2000–2025), 56-country basis with subdivisions for five large nations, and releases a fully reproducible pipeline. It also documents a concrete obstacle for the field — the scarcity of high-quality, high-resolution demand data — and responds with a public data repository.

Real-world applications:

  • Energy system planning: Providing synthetic hourly demand profiles for countries with limited historical data or for exploring future scenarios.
  • Variable renewable integration: More accurate demand forecasts are described as essential for integrating variable renewable resources such as wind and solar.
  • Grid operations: Improved demand forecasting supports managing electricity grids effectively during the energy transition.
  • Emerging-economy planning: The framework is framed as especially relevant to countries in the Global South that must meet growing energy demand while minimizing carbon emissions.

Industry relevance: The tool is aimed at energy system planners and policymakers navigating uncertainty about how much, where, and when electricity will be demanded. Its open-source and reproducible design means utilities, grid operators, and consultancies can adapt it rather than relying on opaque proprietary models.

Future Directions

  • Probabilistic forecasting: Exploring alternative architectures that can generate probabilistic forecasts, since the current model cannot quantify predictive uncertainty — a gap the authors consider especially important for long-term planning.
  • Systematic hyperparameter optimization: Tuning the gradient boosting algorithm more systematically to improve predictive performance.
  • Benchmarking alternative implementations: Running further experiments with other gradient boosting implementations as benchmarks against XGBoost.
  • Addressing geographic imbalance: Expanding historical demand collection and testing alternative training strategies, such as clustering countries by structural similarities, to improve performance in under-represented regions.

Target Audience

Energy system modelers, grid planners, and policymakers who need hourly electricity demand profiles for regions with sparse historical data. The paper is also relevant to machine learning practitioners interested in applying gradient boosting to time-series forecasting across heterogeneous geographic regions, and to researchers studying the data-availability constraints that limit global energy modeling. Readers should be comfortable with concepts such as out-of-sample evaluation, MAPE, and feature engineering, but no deep machine learning background is required.

Authors’ abstract

This paper presents a machine learning framework for electricity demand forecasting across diverse geographical regions using the gradient boosting algorithm XGBoost. The model integrates historical electricity demand and comprehensive weather and socioeconomic variables to predict normalized electricity demand profiles. To enable robust training and evaluation, we developed a large-scale dataset spanning multiple years and countries, applying a temporal data-splitting strategy that ensures benchmarking of out-of-sample performance. Our approach delivers accurate and scalable demand forecasts, providing valuable insights for energy system planners and policymakers as they navigate the challenges of the global energy transition.

Read the original paper