Datasets:
Simplify README, remove monthly aggregation
Browse files
README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
- es
|
| 5 |
-
pretty_name: "REE Iberian Peninsula Electricity Generation
|
| 6 |
tags:
|
| 7 |
- electricity
|
| 8 |
- energy
|
|
@@ -16,174 +16,75 @@ tags:
|
|
| 16 |
size_categories:
|
| 17 |
- 1M<n<10M
|
| 18 |
task_categories:
|
| 19 |
-
- tabular-classification
|
| 20 |
- time-series-forecasting
|
| 21 |
license: cc-by-4.0
|
| 22 |
---
|
| 23 |
|
| 24 |
# REE Iberian Peninsula Electricity Generation
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
## Quick Stats
|
| 29 |
-
|
| 30 |
-
| | Full Resolution | Monthly Aggregate |
|
| 31 |
-
|---|---|---|
|
| 32 |
-
| **Rows** | 1,931,443 | 222 |
|
| 33 |
-
| **Columns** | 38 | 35 |
|
| 34 |
-
| **Date range** | 2007-12-31 → 2026-05-14 | 2007-12 → 2026-05 |
|
| 35 |
-
| **Resolution** | 5 minutes | Monthly mean |
|
| 36 |
-
| **Parquet size** | ~47 MB | ~47 KB |
|
| 37 |
|
| 38 |
## Files
|
| 39 |
|
| 40 |
-
| File |
|
| 41 |
-
|---|---|
|
| 42 |
-
| `ree_peninsula_generation_full.parquet` | Full 5-min resolution, all columns, deduplicated |
|
| 43 |
-
| `ree_peninsula_generation_monthly.parquet` | Monthly mean aggregation |
|
| 44 |
-
| `ree_peninsula_generation_monthly.csv` | Monthly data as CSV for quick inspection |
|
| 45 |
-
|
| 46 |
-
## Columns
|
| 47 |
-
|
| 48 |
-
### Timestamp & Helpers
|
| 49 |
-
|
| 50 |
-
| Column | Type | Description |
|
| 51 |
|---|---|---|
|
| 52 |
-
| `
|
| 53 |
-
| `year` | int | Extracted year |
|
| 54 |
-
| `month` | int | Extracted month (1–12) |
|
| 55 |
-
| `day` | int | Extracted day (1–31) |
|
| 56 |
-
| `hour` | int | Extracted hour (0–23) |
|
| 57 |
-
| `date` | string | Date as `YYYY-MM-DD` |
|
| 58 |
|
| 59 |
-
##
|
| 60 |
-
|
| 61 |
-
| Column | Unit | Description |
|
| 62 |
-
|---|---|---|
|
| 63 |
-
| `dem` | MW | Total electricity demand on the Iberian Peninsula |
|
| 64 |
|
| 65 |
-
|
| 66 |
|
| 67 |
-
| Column |
|
| 68 |
-
|---|---|
|
| 69 |
-
| `
|
| 70 |
-
| `
|
| 71 |
-
| `
|
| 72 |
-
| `
|
| 73 |
-
| `
|
| 74 |
-
| `
|
| 75 |
-
| `
|
| 76 |
-
| `
|
| 77 |
-
| `
|
| 78 |
-
| `
|
| 79 |
-
| `
|
| 80 |
-
| `
|
| 81 |
-
| `
|
| 82 |
-
| `
|
| 83 |
-
| `
|
| 84 |
-
| `
|
| 85 |
-
| `
|
| 86 |
-
| `
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
|
| 91 |
-
|
|
| 92 |
-
| `
|
| 93 |
-
| `
|
| 94 |
-
| `expAnd` | MW | Exports to Andorra |
|
| 95 |
-
| `expMar` | MW | Exports to Morocco |
|
| 96 |
-
| `expPor` | MW | Exports to Portugal |
|
| 97 |
-
| `expFra` | MW | Exports to France |
|
| 98 |
-
| `expTot` | MW | Total exports |
|
| 99 |
-
| `impFra` | MW | Imports from France |
|
| 100 |
-
| `impPor` | MW | Imports from Portugal |
|
| 101 |
-
| `impMar` | MW | Imports from Morocco |
|
| 102 |
-
| `impAnd` | MW | Imports from Andorra |
|
| 103 |
-
| `impTot` | MW | Total imports |
|
| 104 |
-
|
| 105 |
-
### Balancing
|
| 106 |
-
|
| 107 |
-
| Column | Unit | Description |
|
| 108 |
-
|---|---|---|
|
| 109 |
-
| `dif` | MW | Difference / balancing term |
|
| 110 |
|
| 111 |
## Usage
|
| 112 |
|
| 113 |
-
### Python (full resolution)
|
| 114 |
-
|
| 115 |
-
```python
|
| 116 |
-
import pandas as pd
|
| 117 |
-
|
| 118 |
-
df = pd.read_parquet("https://huggingface.co/datasets/daniel-dona/ree-data/resolve/main/ree_peninsula_generation_full.parquet")
|
| 119 |
-
print(df.shape) # (1931443, 38)
|
| 120 |
-
print(df.columns.tolist())
|
| 121 |
-
```
|
| 122 |
-
|
| 123 |
-
### Python (via `datasets` library)
|
| 124 |
-
|
| 125 |
```python
|
| 126 |
from datasets import load_dataset
|
| 127 |
|
| 128 |
ds = load_dataset("daniel-dona/ree-data")
|
| 129 |
-
print(ds)
|
| 130 |
-
```
|
| 131 |
-
|
| 132 |
-
### Python (monthly aggregate)
|
| 133 |
-
|
| 134 |
-
```python
|
| 135 |
-
import pandas as pd
|
| 136 |
-
|
| 137 |
-
m = pd.read_parquet("https://huggingface.co/datasets/daniel-dona/ree-data/resolve/main/ree_peninsula_generation_monthly.parquet")
|
| 138 |
-
# Track the decline of coal over time
|
| 139 |
-
coal_by_year = m.groupby("year")["car"].mean().reset_index()
|
| 140 |
-
print(coal_by_year)
|
| 141 |
-
```
|
| 142 |
-
|
| 143 |
-
### DuckDB (direct SQL on parquet)
|
| 144 |
-
|
| 145 |
-
```sql
|
| 146 |
-
SELECT year, month,
|
| 147 |
-
AVG(eol) AS avg_wind,
|
| 148 |
-
AVG(solFot) AS avg_solar_pv,
|
| 149 |
-
AVG(car) AS avg_coal,
|
| 150 |
-
AVG(nuc) AS avg_nuclear
|
| 151 |
-
FROM read_parquet('ree_peninsula_generation_full.parquet')
|
| 152 |
-
GROUP BY year, month
|
| 153 |
-
ORDER BY year, month;
|
| 154 |
```
|
| 155 |
|
| 156 |
-
##
|
| 157 |
|
| 158 |
-
|
| 159 |
|
| 160 |
```
|
| 161 |
https://demanda.ree.es/WSvisionaMovilesPeninsulaRest/resources/demandaGeneracionPeninsula?fecha=YYYY-MM-DD
|
| 162 |
```
|
| 163 |
|
| 164 |
-
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`.
|
| 165 |
-
|
| 166 |
## Notes
|
| 167 |
|
| 168 |
-
- **Coal phase-out**: Spain's last coal plants closed in 2025
|
| 169 |
-
- **
|
| 170 |
-
- **
|
| 171 |
-
-
|
| 172 |
-
- **`sol` vs `solFot`/`solTer`**: The `sol` column is a legacy aggregate. Prefer `solFot` + `solTer` for accurate solar breakdown.
|
| 173 |
-
- **Updates**: This dataset is a static snapshot as of 2026-05-14. Re-run the source scripts to refresh.
|
| 174 |
|
| 175 |
## License
|
| 176 |
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
## Citation
|
| 180 |
-
|
| 181 |
-
```bibtex
|
| 182 |
-
@dataset{dona2026ree,
|
| 183 |
-
author = {Donat, Daniel},
|
| 184 |
-
title = {REE Iberian Peninsula Electricity Generation (2008--2026)},
|
| 185 |
-
year = {2026},
|
| 186 |
-
url = {https://huggingface.co/datasets/daniel-dona/ree-data},
|
| 187 |
-
note = {Source: Red Eléctrica de España (REE) open data API}
|
| 188 |
-
}
|
| 189 |
-
```
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
- es
|
| 5 |
+
pretty_name: "REE Iberian Peninsula Electricity Generation (2008–2026)"
|
| 6 |
tags:
|
| 7 |
- electricity
|
| 8 |
- energy
|
|
|
|
| 16 |
size_categories:
|
| 17 |
- 1M<n<10M
|
| 18 |
task_categories:
|
|
|
|
| 19 |
- time-series-forecasting
|
| 20 |
license: cc-by-4.0
|
| 21 |
---
|
| 22 |
|
| 23 |
# REE Iberian Peninsula Electricity Generation
|
| 24 |
|
| 25 |
+
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
## Files
|
| 28 |
|
| 29 |
+
| File | Rows | Columns |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|---|---|---|
|
| 31 |
+
| `ree_peninsula_generation_full.parquet` | 1,931,443 | 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
## Columns
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
All 33 columns from the REE API are included, plus 5 time helper columns (`year`, `month`, `day`, `hour`, `date`). All values in **MW**.
|
| 36 |
|
| 37 |
+
| Column | Description |
|
| 38 |
+
|---|---|
|
| 39 |
+
| `ts` | Timestamp (5-minute intervals) |
|
| 40 |
+
| `dem` | Total electricity demand |
|
| 41 |
+
| `eol` | Wind (Eólica) |
|
| 42 |
+
| `nuc` | Nuclear |
|
| 43 |
+
| `gf` | Natural gas (Gas natural) |
|
| 44 |
+
| `car` | Coal (Carbón) |
|
| 45 |
+
| `cc` | Combined cycle (Ciclo combinado) |
|
| 46 |
+
| `hid` | Hydropower (Hidráulica) — can be negative (net pumping) |
|
| 47 |
+
| `sol` | Solar (legacy total; may overlap with `solFot` + `solTer`) |
|
| 48 |
+
| `solFot` | Solar photovoltaic |
|
| 49 |
+
| `solTer` | Solar thermal |
|
| 50 |
+
| `termRenov` | Renewable thermal (biomass) |
|
| 51 |
+
| `cogenResto` | Cogeneration & other |
|
| 52 |
+
| `aut` | Self-generation (Autogeneración) |
|
| 53 |
+
| `conb` | Pumped storage consumption |
|
| 54 |
+
| `turb` | Pumped storage generation |
|
| 55 |
+
| `gnhd` | Non-distributable hydro minus pumping |
|
| 56 |
+
| `bat` | Battery discharge |
|
| 57 |
+
| `consBat` | Battery charging |
|
| 58 |
+
| `vap` | Steam (Vapor) |
|
| 59 |
+
| `inter` | Net international exchange (positive = export) |
|
| 60 |
+
| `icb` | Islanded consumption blocks |
|
| 61 |
+
| `expAnd` / `expMar` / `expPor` / `expFra` / `expTot` | Exports by destination / total |
|
| 62 |
+
| `impFra` / `impPor` / `impMar` / `impAnd` / `impTot` | Imports by origin / total |
|
| 63 |
+
| `dif` | Balancing difference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
## Usage
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
```python
|
| 68 |
from datasets import load_dataset
|
| 69 |
|
| 70 |
ds = load_dataset("daniel-dona/ree-data")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
```
|
| 72 |
|
| 73 |
+
## Source
|
| 74 |
|
| 75 |
+
[REE open data API](https://www.ree.es/en/transparency/opens-data):
|
| 76 |
|
| 77 |
```
|
| 78 |
https://demanda.ree.es/WSvisionaMovilesPeninsulaRest/resources/demandaGeneracionPeninsula?fecha=YYYY-MM-DD
|
| 79 |
```
|
| 80 |
|
|
|
|
|
|
|
| 81 |
## Notes
|
| 82 |
|
| 83 |
+
- **Coal phase-out**: Spain's last coal plants closed in 2025 (`car` → 0 from mid-2025).
|
| 84 |
+
- **`sol` vs `solFot`/`solTer`**: `sol` is a legacy aggregate. Prefer `solFot` + `solTer` for accurate solar.
|
| 85 |
+
- **`hid` negative values** indicate net pumping (pumps consume more than turbines generate).
|
| 86 |
+
- Static snapshot as of 2026-05-14.
|
|
|
|
|
|
|
| 87 |
|
| 88 |
## License
|
| 89 |
|
| 90 |
+
**CC-BY-4.0**. Underlying data published by [REE](https://www.ree.es/en/transparency/opens-data) as open data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|