Update README data_files
Browse files
README.md
CHANGED
|
@@ -6,25 +6,12 @@ tags:
|
|
| 6 |
- tsfile
|
| 7 |
- timeseries
|
| 8 |
- time-series
|
| 9 |
-
- format:tsfile
|
| 10 |
pretty_name: current_velocity
|
| 11 |
configs:
|
| 12 |
- config_name: default
|
| 13 |
data_files:
|
| 14 |
- split: train
|
| 15 |
-
path:
|
| 16 |
-
- split: train
|
| 17 |
-
path: current_velocity_2.tsfile
|
| 18 |
-
- split: train
|
| 19 |
-
path: current_velocity_3.tsfile
|
| 20 |
-
- split: train
|
| 21 |
-
path: current_velocity_4.tsfile
|
| 22 |
-
- split: train
|
| 23 |
-
path: current_velocity_5.tsfile
|
| 24 |
-
- split: train
|
| 25 |
-
path: current_velocity_6.tsfile
|
| 26 |
-
- split: train
|
| 27 |
-
path: current_velocity_7.tsfile
|
| 28 |
---
|
| 29 |
|
| 30 |
# current_velocity (TsFile)
|
|
@@ -33,46 +20,32 @@ Apache TsFile version of the `current_velocity` sub-dataset of [`Real-TSF/TIME-P
|
|
| 33 |
|
| 34 |
## Overview
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
-
- **Source files:**
|
| 39 |
-
- **Converted rows:**
|
| 40 |
-
- **Data files:** `
|
| 41 |
|
| 42 |
## Schema (TsFile structure)
|
| 43 |
|
| 44 |
-
- **
|
| 45 |
-
- **freq** (TAG) — source sampling-frequency directory (e.g. `H`, `15T`
|
| 46 |
-
- **series** (TAG) — source file stem
|
| 47 |
- **channel** (TAG) — source measurement column name.
|
| 48 |
- **measurement** (FIELD, FLOAT) — the measurement value.
|
| 49 |
|
| 50 |
## Usage
|
| 51 |
|
| 52 |
-
Install the Apache TsFile Python SDK (`pip install tsfile`) and read
|
| 53 |
|
| 54 |
```python
|
| 55 |
from pathlib import Path
|
| 56 |
from tsfile import TsFileReader
|
| 57 |
|
| 58 |
-
path = Path("
|
| 59 |
with TsFileReader(str(path)) as reader:
|
| 60 |
schemas = reader.get_all_table_schemas()
|
| 61 |
-
print(
|
| 62 |
-
table_name = next(iter(schemas))
|
| 63 |
-
table = schemas[table_name]
|
| 64 |
-
columns = [column.get_column_name() for column in table.get_columns()]
|
| 65 |
-
print("columns:", columns)
|
| 66 |
-
field_names = [
|
| 67 |
-
column.get_column_name()
|
| 68 |
-
for column in table.get_columns()
|
| 69 |
-
if column.get_column_name() not in {"Time", "time"}
|
| 70 |
-
]
|
| 71 |
-
if field_names:
|
| 72 |
-
with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
|
| 73 |
-
batch = result.read_arrow_batch()
|
| 74 |
-
if batch is not None:
|
| 75 |
-
print(batch.to_pandas().head())
|
| 76 |
```
|
| 77 |
|
| 78 |
## Source & license
|
|
|
|
| 6 |
- tsfile
|
| 7 |
- timeseries
|
| 8 |
- time-series
|
|
|
|
| 9 |
pretty_name: current_velocity
|
| 10 |
configs:
|
| 11 |
- config_name: default
|
| 12 |
data_files:
|
| 13 |
- split: train
|
| 14 |
+
path: data/current_velocity.tsfile
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# current_velocity (TsFile)
|
|
|
|
| 20 |
|
| 21 |
## Overview
|
| 22 |
|
| 23 |
+
Converted to a single long-format TsFile table with 526,612 rows.
|
| 24 |
|
| 25 |
+
- **Source files:** under `https://huggingface.co/datasets/Real-TSF/TIME-ProcessedCSV/tree/main/current_velocity`
|
| 26 |
+
- **Converted rows:** 526,612 (one row per measurement)
|
| 27 |
+
- **Data files:** `data/current_velocity.tsfile`
|
| 28 |
|
| 29 |
## Schema (TsFile structure)
|
| 30 |
|
| 31 |
+
- **time** (TIMESTAMP, milliseconds) — the source `timestamp` column.
|
| 32 |
+
- **freq** (TAG) — source sampling-frequency directory (e.g. `H`, `15T`).
|
| 33 |
+
- **series** (TAG) — source file stem.
|
| 34 |
- **channel** (TAG) — source measurement column name.
|
| 35 |
- **measurement** (FIELD, FLOAT) — the measurement value.
|
| 36 |
|
| 37 |
## Usage
|
| 38 |
|
| 39 |
+
Install the Apache TsFile Python SDK (`pip install tsfile`) and read the file:
|
| 40 |
|
| 41 |
```python
|
| 42 |
from pathlib import Path
|
| 43 |
from tsfile import TsFileReader
|
| 44 |
|
| 45 |
+
path = Path("data/current_velocity.tsfile")
|
| 46 |
with TsFileReader(str(path)) as reader:
|
| 47 |
schemas = reader.get_all_table_schemas()
|
| 48 |
+
print(list(schemas))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
```
|
| 50 |
|
| 51 |
## Source & license
|