THUgewu commited on
Commit
7e6785f
·
verified ·
1 Parent(s): 1cb5636

Add TsFile (converted from daniel-dona/ree-data)

Browse files
.gitattributes CHANGED
@@ -58,3 +58,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ ree_data_1.tsfile filter=lfs diff=lfs merge=lfs -text
62
+ ree_data_2.tsfile filter=lfs diff=lfs merge=lfs -text
63
+ ree_data_3.tsfile filter=lfs diff=lfs merge=lfs -text
64
+ ree_data_4.tsfile filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - time-series-forecasting
5
+ language:
6
+ - en
7
+ - es
8
+ tags:
9
+ - tsfile
10
+ - timeseries
11
+ - electricity
12
+ - energy
13
+ - spain
14
+ - iberia
15
+ - generation
16
+ - demand
17
+ - time-series
18
+ - renewables
19
+ - power-grid
20
+ - format:tsfile
21
+ pretty_name: REE Iberian Peninsula Electricity Generation (2008–2026) (TsFile)
22
+ size_categories:
23
+ - 1M<n<10M
24
+ configs:
25
+ - config_name: default
26
+ data_files:
27
+ - split: ree_data_1
28
+ path: ree_data_1.tsfile
29
+ - split: ree_data_2
30
+ path: ree_data_2.tsfile
31
+ - split: ree_data_3
32
+ path: ree_data_3.tsfile
33
+ - split: ree_data_4
34
+ path: ree_data_4.tsfile
35
+ ---
36
+
37
+ # REE Iberian Peninsula Electricity Generation (2008–2026) (TsFile)
38
+
39
+ Apache TsFile version of [`daniel-dona/ree-data`](https://huggingface.co/datasets/daniel-dona/ree-data).
40
+
41
+ ## Overview
42
+
43
+ Electricity **demand and generation by source** for the Iberian Peninsula, sourced from [REE (Red Eléctrica de España)](https://www.ree.es/). Covers **2008–present** at **5-minute resolution**, fully deduplicated.
44
+
45
+ - **Tables:** `ree_data`
46
+ - **Rows:** 1,931,443 across 1 TsFile table(s).
47
+ - `ree_data`: 1,931,443 rows, 2007-12-31 21:00:00 → 2026-05-14 11:15:00 (UTC)
48
+
49
+ ## Schema (TsFile structure)
50
+
51
+ ### `ree_data.tsfile`
52
+
53
+ - **Time** (INT64, milliseconds) — the source `ts` timestamp as INT64 milliseconds.
54
+ - **TAG**: none — the table is a single device / single series.
55
+ - **FIELD** (37): `dem` (int64), `eol` (int64), `nuc` (int64), `gf` (int64), `car` (int64), `cc` (int64), `hid` (int64), `aut` (int64), `inter` (int64), `icb` (int64), `sol` (int64), `solFot` (int64), `solTer` (int64), `termRenov` (int64), `cogenResto` (int64), `expAnd` (int64), `expMar` (int64), `expPor` (int64), `expFra` (int64), `expTot` (int64), `impFra` (int64), `impPor` (int64), `impMar` (int64), `impAnd` (int64), `impTot` (int64), `conb` (int64), `turb` (int64), `gnhd` (int64), `bat` (int64), `consBat` (int64), `dif` (int64), `vap` (int64), `year` (int32), `month` (int32), `day` (int32), `hour` (int32), `date` (string)
56
+
57
+ ## Conversion notes
58
+
59
+ - The source is a single `train` split stored as two Parquet shards; both shards are concatenated into the single TsFile `ree_data.tsfile` (the split is preserved, not mixed with any other split).
60
+ - Time is the source `ts` timestamp (hourly, Spanish peninsular time) as INT64 milliseconds. The redundant calendar columns `year`/`month`/`day`/`hour`/`date` are kept as FIELDs.
61
+ - Single device (the Spanish peninsular system), no TAG column; all 38 source columns kept.
62
+
63
+ ## Usage
64
+
65
+ Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file:
66
+
67
+ ```python
68
+ from pathlib import Path
69
+ from tsfile import TsFileReader
70
+
71
+ path = Path("ree_data_1.tsfile")
72
+ with TsFileReader(str(path)) as reader:
73
+ schemas = reader.get_all_table_schemas()
74
+ print("tables:", list(schemas))
75
+ table_name = next(iter(schemas))
76
+ table = schemas[table_name]
77
+ columns = [column.get_column_name() for column in table.get_columns()]
78
+ print("columns:", columns)
79
+ field_names = [
80
+ column.get_column_name()
81
+ for column in table.get_columns()
82
+ if column.get_column_name() not in {"Time", "time"}
83
+ ]
84
+ if field_names:
85
+ with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
86
+ batch = result.read_arrow_batch()
87
+ if batch is not None:
88
+ print(batch.to_pandas().head())
89
+ ```
90
+
91
+ ## Source & license
92
+
93
+ - Original dataset: [`daniel-dona/ree-data`](https://huggingface.co/datasets/daniel-dona/ree-data)
94
+ - Source card title / publisher: REE Iberian Peninsula Electricity Generation (2008–2026)
95
+ - License: cc-by-4.0 (as declared by the original dataset).
ree_data_1.tsfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f15c956f1aa7ea9598f0d7b93c2fddd7c3a4cbc6de3e0a498fb772a76ea63c1a
3
+ size 5248918
ree_data_2.tsfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:574ecec38789080f527150fb69c2c9f8d479d253272012c63d820abfddfaa65e
3
+ size 6266031
ree_data_3.tsfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a138f3e90efee60d71224f611fb3160436f9fc0470b32bbd22426775da096963
3
+ size 6870065
ree_data_4.tsfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e675c01e6dfa716e601eabc13b9cc6e05743ce0a1469bb3f5128385edc25e230
3
+ size 9057107
source_dataset_card.md ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - es
5
+ pretty_name: "REE Iberian Peninsula Electricity Generation (2008–2026)"
6
+ tags:
7
+ - electricity
8
+ - energy
9
+ - spain
10
+ - iberia
11
+ - generation
12
+ - demand
13
+ - time-series
14
+ - renewables
15
+ - power-grid
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://www.ree.es/). Covers **2008–present** at **5-minute resolution**, fully deduplicated.
26
+
27
+ ## Dataset Summary
28
+
29
+ - **1,931,443 rows** × 38 columns
30
+ - **Date range**: 2007-12-31 → 2026-05-14
31
+ - **Resolution**: 5 minutes
32
+
33
+ ## Columns
34
+
35
+ 33 columns from the REE API, plus `ts` (timestamp). All values in **MW**.
36
+
37
+ | Column | Description |
38
+ |---|---|
39
+ | `dem` | Total electricity demand |
40
+ | `eol` | Wind (Eólica) |
41
+ | `nuc` | Nuclear |
42
+ | `gf` | Natural gas (Gas natural) |
43
+ | `car` | Coal (Carbón) |
44
+ | `cc` | Combined cycle (Ciclo combinado) |
45
+ | `hid` | Hydropower (Hidráulica) — can be negative (net pumping) |
46
+ | `sol` | Solar (legacy total; may overlap with `solFot` + `solTer`) |
47
+ | `solFot` | Solar photovoltaic |
48
+ | `solTer` | Solar thermal |
49
+ | `termRenov` | Renewable thermal (biomass) |
50
+ | `cogenResto` | Cogeneration & other |
51
+ | `aut` | Self-generation (Autogeneración) |
52
+ | `conb` | Pumped storage consumption |
53
+ | `turb` | Pumped storage generation |
54
+ | `gnhd` | Non-distributable hydro minus pumping |
55
+ | `bat` | Battery discharge |
56
+ | `consBat` | Battery charging |
57
+ | `vap` | Steam (Vapor) |
58
+ | `inter` | Net international exchange (positive = export) |
59
+ | `icb` | Islanded consumption blocks |
60
+ | `expAnd` / `expMar` / `expPor` / `expFra` / `expTot` | Exports by destination / total |
61
+ | `impFra` / `impPor` / `impMar` / `impAnd` / `impTot` | Imports by origin / total |
62
+ | `dif` | Balancing difference |
63
+
64
+ ## Column History
65
+
66
+ The API schema has always contained all 33 columns, but several transitioned from zero to active (or vice versa) as infrastructure was built or reporting changed:
67
+
68
+ | Column(s) | Change | Date |
69
+ |---|---|---|
70
+ | `icb` | zero → active | 2013-02-28 08:50 |
71
+ | `sol` | zero → active (solar aggregate) | 2013-07-24 09:10 |
72
+ | `solFot`, `solTer` | zero → active (solar split into PV + thermal; `sol` kept as legacy aggregate) | 2015-04-30 22:00 |
73
+ | `termRenov`, `cogenResto` | zero → active | 2015-04-30 22:00 |
74
+ | `gnhd`, `conb` | zero → active (pumped storage detail) | 2022-01-25 |
75
+ | `turb` | zero → active (pumped storage turbine) | 2024-09-19 08:45 |
76
+ | `exp*`, `imp*` | zero → active (per-country exchange breakdown) | 2024-09-18 02:00 |
77
+ | `bat`, `consBat`, `dif` | zero → active (grid-scale batteries) | 2024-10-24 |
78
+ | `vap` | zero → active (steam generation) | 2025-07-14 14:00 |
79
+ | `gf` | active → zero (natural gas fuel discontinued) | 2024-10-01 13:00 |
80
+ | `aut` | active → zero (self-generation reporting discontinued) | 2025-12-11 11:10 |
81
+
82
+ ## Usage
83
+
84
+ ```python
85
+ from datasets import load_dataset
86
+
87
+ ds = load_dataset("daniel-dona/ree-data")
88
+ ```
89
+
90
+ ## Notes
91
+
92
+ - **`hid` negative values** indicate net pumping (pumps consume more than turbines generate).
93
+ - **`sol` vs `solFot`/`solTer`**: `sol` is a legacy aggregate. Prefer `solFot` + `solTer` for accurate solar.
94
+ - Static snapshot as of 2026-05-14.
95
+
96
+ ## License
97
+
98
+ **CC-BY-4.0**. Underlying data published by [REE](https://www.ree.es/) as open data.