Skip to content

EntsoeSource

EntsoeSource

Downloads electricity data from the ENTSOE Transparency Platform including load, price, and generation data.

Setup

You need an ENTSOE API key:

  1. Register at ENTSOE Transparency Platform
  2. Request an API key from your account settings

Basic Usage

from epftoolbox2.data.sources import EntsoeSource
import os
source = EntsoeSource(
country_code="PL",
api_key=os.environ.get("ENTSOE_API_KEY"),
type=["load", "price"],
)
df = source.fetch(
start=pd.Timestamp("2024-01-01", tz="UTC"),
end=pd.Timestamp("2024-06-01", tz="UTC"),
)

Parameters

ParameterTypeRequiredDescription
country_codestrYesCountry/zone code (see table below)
api_keystrYesENTSOE API key
typeList[str]YesData types: load, price, generation

Data Types

Load Data (type=["load"])

ColumnDescription
load_actualActual electricity load (MW)
load_forecastDay-ahead load forecast (MW)

Price Data (type=["price"])

ColumnDescription
priceDay-ahead electricity price (EUR/MWh)

Generation Data (type=["generation"])

All supported generation types:

ColumnDescription
generation_biomassBiomass generation (MW)
generation_fossil_brown_coal_ligniteLignite generation (MW)
generation_fossil_coal_derived_gasCoal-derived gas (MW)
generation_fossil_gasNatural gas generation (MW)
generation_fossil_hard_coalHard coal generation (MW)
generation_fossil_oilOil generation (MW)
generation_fossil_oil_shaleOil shale generation (MW)
generation_fossil_peatPeat generation (MW)
generation_geothermalGeothermal generation (MW)
generation_hydro_pumped_storagePumped hydro storage (MW)
generation_hydro_run_of_riverRun-of-river hydro (MW)
generation_hydro_water_reservoirReservoir hydro (MW)
generation_marineMarine/tidal generation (MW)
generation_nuclearNuclear generation (MW)
generation_otherOther generation (MW)
generation_other_renewableOther renewable (MW)
generation_solarSolar generation (MW)
generation_wasteWaste generation (MW)
generation_wind_offshoreOffshore wind (MW)
generation_wind_onshoreOnshore wind (MW)

Supported Countries & Area Codes

CodeCountryArea Code
ATAustria10YAT-APG------L
BEBelgium10YBE----------2
BGBulgaria10YCA-BULGARIA-R
CHSwitzerland10YCH-SWISSGRIDZ
CZCzechia10YCZ-CEPS-----N
DEGermany10Y1001A1001A83F
DKDenmark10Y1001A1001A65H
EEEstonia10Y1001A1001A39I
ESSpain10YES-REE------0
FIFinland10YFI-1--------U
FRFrance10YFR-RTE------C
GBGreat Britain10YGB----------A
GRGreece10YGR-HTSO-----Y
HRCroatia10YHR-HEP------M
HUHungary10YHU-MAVIR----U
IEIreland10Y1001A1001A59C
ITItaly10YIT-GRTN-----B
LTLithuania10YLT-1001A0008Q
LULuxembourg10YLU-CEGEDEL-NQ
LVLatvia10YLV-1001A00074
NLNetherlands10YNL----------L
NONorway10YNO-0--------C
PLPoland10YPL-AREA-----S
PTPortugal10YPT-REN------W
RORomania10YRO-TEL------P
RSSerbia10YCS-SERBIATSOV
SESweden10YSE-1--------K
SISlovenia10YSI-ELES-----O
SKSlovakia10YSK-SEPS-----K
UAUkraine10Y1001C—00003F

Output

Data is returned with a UTC DatetimeIndex:

print(df.head())
# load_actual price
# 2024-01-01 00:00:00+00:00 12508.71 5.75
# 2024-01-01 01:00:00+00:00 11845.20 5.27