Skip to content

Database Schema

EPF uses a single SQLite database with 6 tables.

Tables Overview

TablePurposePrimary KeyRows (typical)
ree_hourlyHourly REE/ESIOS datadatetime_utc~35,000 (3+ years)
ree_15min15-minute REE datadatetime_utc~18,000 (~5 months)
predictionsForecast resultscomposite (6 cols)~500,000+
weather_hourlyOpen-Meteo hourlydatetime_utc~30,000
commodity_dailyTTF gas, Brent oil & ETS carbondate~1,500

ree_hourly

Hourly electricity market data from REE/ESIOS since 2022-01-01.

ColumnTypeDescription
datetime_utcTEXTISO 8601 timestamp (PK)
day_ahead_priceREALDay-ahead market price (EUR/MWh)
intraday_priceREALIntraday market price
real_demandREALReal-time demand (MW)
demand_forecastREALDemand forecast (MW)
wind_generationREALWind generation (MW)
solar_pv_generationREALSolar PV generation (MW)
solar_thermal_genREALSolar thermal generation (MW)
hydro_generationREALHydroelectric generation (MW)
nuclear_generationREALNuclear generation (MW)
combined_cycle_genREALGas combined cycle (MW)
coal_generationREALCoal generation (MW)
cogenerationREALIndustrial cogeneration (MW)
fuel_gas_generationREALFuel gas generation (MW)
france_interconnectionREALFrance flow (MW, +import/-export)
portugal_interconnectionREALPortugal flow (MW)
morocco_interconnectionREALMorocco flow (MW)
collected_atTEXTCollection timestamp

predictions

Forecast results with confidence intervals.

ColumnTypeDescription
prediction_dateTEXTDate forecast was generated
target_dateTEXTDate being predicted
target_hourINTEGERHour (0-23)
target_minuteINTEGERMinute (0, 15, 30, 45)
model_nameTEXTModel identifier
run_modeTEXTdayahead, strategic, or legacy
predicted_priceREALPoint forecast (EUR/MWh)
actual_priceREALActual price (backfilled)
model_versionTEXTTraining date
prediction_lower_90REAL5th percentile
prediction_upper_90REAL95th percentile
prediction_lower_50REAL25th percentile
prediction_upper_50REAL75th percentile

Primary Key: (prediction_date, target_date, target_hour, target_minute, model_name, run_mode)

commodity_daily

ColumnTypeDescription
dateTEXTDate (PK)
ttf_gas_eur_mwhREALTTF gas price (EUR/MWh)
brent_oil_usd_bblREALBrent crude oil price (USD/bbl)
ets_carbon_eurREALETS carbon price (EUR/tCO2)
collected_atTEXTCollection timestamp

weather_hourly

ColumnTypeDescription
datetime_utcTEXTTimestamp (PK)
temp_cREALTemperature (°C)
wind_speed_kmhREALWind speed (km/h)
precipitation_mmREALPrecipitation (mm)
sunshine_hoursREALSunshine duration (hours)
cloud_cover_pctREALCloud cover (%)
direct_radiation_wm2REALDirect solar radiation (W/m²)
diffuse_radiation_wm2REALDiffuse solar radiation (W/m²)
collected_atTEXTCollection timestamp