Datasets:
Simplify README, remove monthly aggregation
Browse files1 unmodified line23456787 unmodified lines1617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891 unmodified linelanguage:- en- espretty_name: "REE Iberian Peninsula Electricity Generation — 5-min resolution (2008–2026)"tags:- electricity- energy7 unmodified linessize_categories:- 1M<n<10Mtask_categories:- tabular-classification- time-series-forecastinglicense: cc-by-4.0---# REE Iberian Peninsula Electricity GenerationHourly electricity **demand and generation by source** for the Iberian Peninsula, sourced from [REE (Red Eléctrica de España)](https://demanda.ree.es/). Covers **2008–present** at **5-minute resolution**, fully deduplicated.## Quick Stats| | Full Resolution | Monthly Aggregate ||---|---|---|| **Rows** | 1,931,443 | 222 || **Columns** | 38 | 35 || **Date range** | 2007-12-31 → 2026-05-14 | 2007-12 → 2026-05 || **Resolution** | 5 minutes | Monthly mean || **Parquet size** | ~47 MB | ~47 KB |## Files| File | Description ||---|---|| `ree_peninsula_generation_full.parquet` | Full 5-min resolution, all columns, deduplicated || `ree_peninsula_generation_monthly.parquet` | Monthly mean aggregation || `ree_peninsula_generation_monthly.csv` | Monthly data as CSV for quick inspection |## Columns### Timestamp & Helpers| Column | Type | Description ||---|---|---|| `ts` | datetime | Timestamp (5-minute intervals) || `year` | int | Extracted year || `month` | int | Extracted month (1–12) || `day` | int | Extracted day (1–31) || `hour` | int | Extracted hour (0–23) || `date` | string | Date as `YYYY-MM-DD` |### Demand| Column | Unit | Description ||---|---|---|| `dem` | MW | Total electricity demand on the Iberian Peninsula |### Generation by Source| Column | Unit | Description (ES) ||---|---|---|| `eol` | MW | Eólica (Wind) || `nuc` | MW | Nuclear || `gf` | MW | Gas natural || `car` | MW | Carbón (Coal) || `cc` | MW | Ciclo combinado (Combined cycle) || `hid` | MW | Hidráulica (Hydropower) || `sol` | MW | Solar (legacy total; may overlap with `solFot` + `solTer`) || `solFot` | MW | Solar fotovoltaica (Photovoltaic) || `solTer` | MW | Solar térmica (Concentrated solar thermal) || `termRenov` | MW | Térmica renovable (Renewable thermal / biomass) || `cogenResto` | MW | Cogeneración y resto (Cogeneration & other) || `aut` | MW | Autogeneración (Self-generation) || `conb` | MW | Bombeo (Pumped storage consumption) || `turb` | MW | Turbinación (Pumped storage generation) || `gnhd` | MW | Hidráulica no distrib. bombeo || `bat` | MW | Baterías (Battery discharge) || `consBat` | MW | Consumo de baterías (Battery charging) || `vap` | MW | Vapor (Steam) |### International Exchange| Column | Unit | Description ||---|---|---|| `inter` | MW | Net international exchange (positive = net export) || `icb` | MW | Islanded consumption blocks || `expAnd` | MW | Exports to Andorra || `expMar` | MW | Exports to Morocco || `expPor` | MW | Exports to Portugal || `expFra` | MW | Exports to France || `expTot` | MW | Total exports || `impFra` | MW | Imports from France || `impPor` | MW | Imports from Portugal || `impMar` | MW | Imports from Morocco || `impAnd` | MW | Imports from Andorra || `impTot` | MW | Total imports |### Balancing| Column | Unit | Description ||---|---|---|| `dif` | MW | Difference / balancing term |## Usage### Python (full resolution)```pythonimport pandas as pddf = pd.read_parquet("https://huggingface.co/datasets/daniel-dona/ree-data/resolve/main/ree_peninsula_generation_full.parquet")print(df.shape) # (1931443, 38)print(df.columns.tolist())```### Python (via `datasets` library)```pythonfrom datasets import load_datasetds = load_dataset("daniel-dona/ree-data")print(ds)```### Python (monthly aggregate)```pythonimport pandas as pdm = pd.read_parquet("https://huggingface.co/datasets/daniel-dona/ree-data/resolve/main/ree_peninsula_generation_monthly.parquet")# Track the decline of coal over timecoal_by_year = m.groupby("year")["car"].mean().reset_index()print(coal_by_year)```### DuckDB (direct SQL on parquet)```sqlSELECT year, month,AVG(eol) AS avg_wind,AVG(solFot) AS avg_solar_pv,AVG(car) AS avg_coal,AVG(nuc) AS avg_nuclearFROM read_parquet('ree_peninsula_generation_full.parquet')GROUP BY year, monthORDER BY year, month;```## Data SourceAll data is from the [REE (Red Eléctrica de España)](https://demanda.ree.es/) open API:```https://demanda.ree.es/WSvisionaMovilesPeninsulaRest/resources/demandaGeneracionPeninsula?fecha=YYYY-MM-DD```Each daily JSON contains ~288 records (5-minute intervals × 24 hours) plus a few hours of overlap into adjacent days. The dataset in this repo is **fully deduplicated** on `ts`.## Notes- **Coal phase-out**: Spain's last coal plants closed in 2025. The `car` column drops to near-zero from mid-2025 onward.- **Solar growth**: `solFot` and `solTer` show the rapid expansion of solar from ~2015 onward.- **Battery storage**: `bat` and `consBat` become non-trivial from ~2022, reflecting grid-scale battery deployment.- **`hid` can be negative**: Negative hydro values indicate net pumping (more energy consumed by pumps than generated by turbines).- **`sol` vs `solFot`/`solTer`**: The `sol` column is a legacy aggregate. Prefer `solFot` + `solTer` for accurate solar breakdown.- **Updates**: This dataset is a static snapshot as of 2026-05-14. Re-run the source scripts to refresh.## LicenseThis dataset is published under **CC-BY-4.0**. The underlying data is published by [REE](https://www.ree.es/en/transparency/opens-data) as open data.## Citation```bibtex@dataset{dona2026ree,author = {Donat, Daniel},title = {REE Iberian Peninsula Electricity Generation (2008--2026)},year = {2026},url = {https://huggingface.co/datasets/daniel-dona/ree-data},note = {Source: Red Eléctrica de España (REE) open data API}}```1 unmodified line23456787 unmodified lines1617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889901 unmodified linelanguage:- en- espretty_name: "REE Iberian Peninsula Electricity Generation (2008–2026)"tags:- electricity- energy7 unmodified linessize_categories:- 1M<n<10Mtask_categories:- time-series-forecastinglicense: cc-by-4.0---# REE Iberian Peninsula Electricity GenerationElectricity **demand and generation by source** for the Iberian Peninsula, sourced from [REE (Red Eléctrica de España)](https://demanda.ree.es/). Covers **2008–present** at **5-minute resolution**, fully deduplicated.## Files| File | Rows | Columns ||---|---|---|| `ree_peninsula_generation_full.parquet` | 1,931,443 | 38 |## ColumnsAll 33 columns from the REE API are included, plus 5 time helper columns (`year`, `month`, `day`, `hour`, `date`). All values in **MW**.| Column | Description ||---|---|| `ts` | Timestamp (5-minute intervals) || `dem` | Total electricity demand || `eol` | Wind (Eólica) || `nuc` | Nuclear || `gf` | Natural gas (Gas natural) || `car` | Coal (Carbón) || `cc` | Combined cycle (Ciclo combinado) || `hid` | Hydropower (Hidráulica) — can be negative (net pumping) || `sol` | Solar (legacy total; may overlap with `solFot` + `solTer`) || `solFot` | Solar photovoltaic || `solTer` | Solar thermal || `termRenov` | Renewable thermal (biomass) || `cogenResto` | Cogeneration & other || `aut` | Self-generation (Autogeneración) || `conb` | Pumped storage consumption || `turb` | Pumped storage generation || `gnhd` | Non-distributable hydro minus pumping || `bat` | Battery discharge || `consBat` | Battery charging || `vap` | Steam (Vapor) || `inter` | Net international exchange (positive = export) || `icb` | Islanded consumption blocks || `expAnd` / `expMar` / `expPor` / `expFra` / `expTot` | Exports by destination / total || `impFra` / `impPor` / `impMar` / `impAnd` / `impTot` | Imports by origin / total || `dif` | Balancing difference |## Usage```pythonfrom datasets import load_datasetds = load_dataset("daniel-dona/ree-data")```## Source[REE open data API](https://www.ree.es/en/transparency/opens-data):```https://demanda.ree.es/WSvisionaMovilesPeninsulaRest/resources/demandaGeneracionPeninsula?fecha=YYYY-MM-DD```## Notes- **Coal phase-out**: Spain's last coal plants closed in 2025 (`car` → 0 from mid-2025).- **`sol` vs `solFot`/`solTer`**: `sol` is a legacy aggregate. Prefer `solFot` + `solTer` for accurate solar.- **`hid` negative values** indicate net pumping (pumps consume more than turbines generate).- Static snapshot as of 2026-05-14.## License**CC-BY-4.0**. Underlying data published by [REE](https://www.ree.es/en/transparency/opens-data) as open data.
README.md+40-139