Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ load:
scaling_factor: 1.0
fixed_year: false
supplement_synthetic: true
substation_only: true
distribution_key:
gdp: 0.6
population: 0.4
Expand Down
1 change: 1 addition & 0 deletions doc/configtables/load.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ manual_adjustments,bool,"{true, false}","Whether to adjust the load data manuall
scaling_factor,--,float,"Global correction factor for the load time series."
fixed_year,--,Year or False,"To specify a fixed year for the load time series that deviates from the snapshots' year"
supplement_synthetic,bool,"{true, false}","Whether to supplement missing data for selected time period should be supplemented by synthetic data from https://zenodo.org/records/10820928."
substation_only,bool,"{true, false}","Whether to only consider substations for the spatial disaggregation of the per-country electricity demand data."
distribution_key,--,--,"Distribution key for spatially disaggregating the per-country electricity demand data."
-- gdp,float,"[0, 1]","Weighting factor for the GDP data in the distribution key."
-- population,float,"[0, 1]","Weighting factor for the population data in the distribution key."
23 changes: 22 additions & 1 deletion doc/data-retrieval.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,25 @@ Data in this section is retrieved and extracted in rules specified in ``rules/re
- **Source:** European Network of Transmission System Operators for Electricity (ENTSO-E) and European Network of Transmission System Operators for Gas (ENTSOG)
- **Link:** https://2024.entsos-tyndp-scenarios.eu/download/
- **License:** CC-BY 4.0
- **Description:** Contains the node list and the reference grids from the Ten-Year Network Development Plan (TYNDP) 2024.
- **Description:** Contains the node list and the reference grids from the Ten-Year Network Development Plan (TYNDP) 2024.

``data/demand-distribution/electricity_tot_demand_2019.tif``

- **Source:** JRC Energy Atlas
- **Link:** https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/EIGL-Data/RASTER/ and https://energy-industry-geolab.jrc.ec.europa.eu/energy-atlas/
- **License:** CC-BY 4.0 (https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/EIGL-Data/RASTER/copyright.txt)
- **Description:** Contains 1km by 1km raster data of annual electricity demand per EU country.

``data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx`
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing closing backtick for the filename. Should end with two backticks: data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx

Suggested change
``data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx`
``data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx``

Copilot uses AI. Check for mistakes.


- **Source:** UK Government, Department for Energy Security and Net Zero
- **Link:** https://www.gov.uk/government/statistics/regional-and-local-authority-electricity-consumption-statistics
- **License:** Open Government Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)
- **Description:** Contains subnational electricity consumption statistics from 2005 to 2023.

``data/Local_Authority_Districts_May_2024_Boundaries__UK_BSC.geojson``

- **Source:** UK Office for National Statistics
- **Link:** https://geoportal.statistics.gov.uk/datasets/ons::local-authority-districts-may-2024-boundaries-uk-bsc-2/about
- **License:** Open Government Licence v.3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)
- **Description:** Contains shapefiles of local authorities in the United Kingdom.
11 changes: 11 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ Upcoming Release
* Fix `retrieve_eurostat_data` and `retrieve_eurostat_household_data` on Windows by avoiding a double access to a temporary file.
(https://github.com/PyPSA/pypsa-eur/pull/1825)

* Distributing country-level electricity demand time series to subnational model
regions of EU countries now uses data from the `JRC Energy Atlas
<https://energy-industry-geolab.jrc.ec.europa.eu/energy-atlas>`__. This
dataset provides electricity consumption on a 1km by 1km raster for the year,
which is more accurate than the previous NUTS3-based distribution. Another
dataset is used for Great Britain from the `Department for Energy Security and
Net Zero
<https://www.gov.uk/government/statistics/regional-and-local-authority-electricity-consumption-statistics>`__.
Other non-EU countries still use NUTS3-based distribution keys from GDP and
population.
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace after period should be removed.

Suggested change
population.
population.

Copilot uses AI. Check for mistakes.


PyPSA-Eur v2025.07.0 (11th July 2025)
=====================================

Expand Down
16 changes: 16 additions & 0 deletions doc/retrieve.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@ None.

- ``data/electricity_demand_raw.csv``

Rule ``retrieve_electricity_demand_energy_atlas``
=================================================

This rule downloads 1km by 1km raster of estimated annual electricity demand from the `JRC Energy Atlas <https://energy-industry-geolab.jrc.ec.europa.eu/energy-atlas/>`__ .

Rule ``retrieve_electricity_demand_subnational_gb``
===================================================

This rule downloads subnational electricity consumption data for Great Britain from the `Department for Energy Security and Net Zero <https://www.gov.uk/government/statistics/regional-and-local-authority-electricity-consumption-statistics>`__ .

Rule ``retrieve_local_authorities_uk``
======================================

This rule downloads shapefiles of local authorities in the United Kingdom from the `Office for National Statistics <https://geoportal.statistics.gov.uk/datasets/ons::local-authority-districts-may-2024-boundaries-uk-bsc-2/about>`__ .


Rule ``retrieve_tyndp_bundle``
=========================================

Expand Down
1 change: 1 addition & 0 deletions envs/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dependencies:
- cartopy
- descartes
- rasterio
- rasterstats

# Development dependencies
- jupyter
Expand Down
4 changes: 4 additions & 0 deletions rules/build_electricity.smk
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,13 @@ def input_class_regions(w):
rule build_electricity_demand_base:
params:
distribution_key=config_provider("load", "distribution_key"),
substation_only=config_provider("load", "substation_only"),
input:
base_network=resources("networks/base_s.nc"),
regions=resources("regions_onshore_base_s.geojson"),
raster="data/demand-distribution/electricity_tot_demand_2019.tif",
gb_excel="data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx",
gb_geojson="data/Local_Authority_Districts_May_2024_Boundaries__UK_BSC.geojson",
nuts3=resources("nuts3_shapes.geojson"),
load=resources("electricity_demand.csv"),
output:
Expand Down
56 changes: 56 additions & 0 deletions rules/retrieve.smk
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,62 @@ if config["enable"]["retrieve"]:
move(input[0], output[0])


if config["enable"]["retrieve"]:

rule retrieve_electricity_demand_energy_atlas:
input:
storage(
"https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/EIGL-Data/RASTER/electricity_tot_demand_2019.tif",
),
output:
"data/demand-distribution/electricity_tot_demand_2019.tif",
log:
"logs/retrieve_electricity_demand_energy_atlas.log",
resources:
mem_mb=5000,
retries: 2
run:
move(input[0], output[0])


if config["enable"]["retrieve"]:

rule retrieve_electricity_demand_subnational_gb:
input:
storage(
"https://assets.publishing.service.gov.uk/media/6762951abe7b2c675de30705/Subnational_electricity_consumption_statistics_2005-2023.xlsx",
),
output:
"data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx",
log:
"logs/retrieve_electricity_demand_subnational_gb.log",
resources:
mem_mb=5000,
retries: 2
run:
move(input[0], output[0])


if config["enable"]["retrieve"]:

rule retrieve_local_authorities_uk:
output:
"data/Local_Authority_Districts_May_2024_Boundaries__UK_BSC.geojson",
run:
import requests

url = "https://services1.arcgis.com/ESMARspQHYMw9BZ9/arcgis/rest/services/Local_Authority_Districts_May_2024_Boundaries__UK_BSC/FeatureServer/0/query"
params = {
"outFields": "*",
"where": "1=1",
"f": "geojson",
}
response = requests.get(url, params=params)
with open(output[0], "wb") as f:
f.write(response.content)



if config["enable"]["retrieve"]:

rule retrieve_ship_raster:
Expand Down
Loading
Loading