THUgewu commited on
Commit
46f398c
·
verified ·
1 Parent(s): 3921306

Add TsFile (converted from Real-TSF/TIME-ProcessedCSV)

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +70 -0
  3. us_term_structure.tsfile +3 -0
.gitattributes CHANGED
@@ -58,3 +58,4 @@ 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
+ us_term_structure.tsfile filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - time-series-forecasting
5
+ tags:
6
+ - tsfile
7
+ - timeseries
8
+ - time-series
9
+ - format:tsfile
10
+ pretty_name: US_Term_Structure
11
+ configs:
12
+ - config_name: default
13
+ data_files:
14
+ - split: train
15
+ path: us_term_structure.tsfile
16
+ ---
17
+
18
+ # US_Term_Structure (TsFile)
19
+
20
+ Apache TsFile version of the `US_Term_Structure` sub-dataset of [`Real-TSF/TIME-ProcessedCSV`](https://huggingface.co/datasets/Real-TSF/TIME-ProcessedCSV).
21
+
22
+ ## Overview
23
+
24
+ `US_Term_Structure` is one of the processed time-series collections bundled in TIME-ProcessedCSV, a multi-domain repository of cleaned CSV series (energy, transport, weather, finance, health and more), each with a `timestamp` column and one or more measurement columns per file.
25
+
26
+ - **Source files:** 1 CSV file(s) under `https://huggingface.co/datasets/Real-TSF/TIME-ProcessedCSV/tree/main/US_Term_Structure`
27
+ - **Converted rows:** 373,040 (long format: one row per measurement)
28
+ - **Data files:** `['us_term_structure.tsfile']`
29
+
30
+ ## Schema (TsFile structure)
31
+
32
+ - **Time** (INT64, milliseconds) — the source `timestamp` column.
33
+ - **freq** (TAG) — source sampling-frequency directory (e.g. `H`, `15T`, `D`).
34
+ - **series** (TAG) — source file stem (e.g. `item0`, `NRSROT`).
35
+ - **channel** (TAG) — source measurement column name.
36
+ - **measurement** (FIELD, FLOAT) — the measurement value.
37
+
38
+ ## Usage
39
+
40
+ Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file:
41
+
42
+ ```python
43
+ from pathlib import Path
44
+ from tsfile import TsFileReader
45
+
46
+ path = Path("us_term_structure.tsfile")
47
+ with TsFileReader(str(path)) as reader:
48
+ schemas = reader.get_all_table_schemas()
49
+ print("tables:", list(schemas))
50
+ table_name = next(iter(schemas))
51
+ table = schemas[table_name]
52
+ columns = [column.get_column_name() for column in table.get_columns()]
53
+ print("columns:", columns)
54
+ field_names = [
55
+ column.get_column_name()
56
+ for column in table.get_columns()
57
+ if column.get_column_name() not in {"Time", "time"}
58
+ ]
59
+ if field_names:
60
+ with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
61
+ batch = result.read_arrow_batch()
62
+ if batch is not None:
63
+ print(batch.to_pandas().head())
64
+ ```
65
+
66
+ ## Source & license
67
+
68
+ - Original dataset: https://huggingface.co/datasets/Real-TSF/TIME-ProcessedCSV/tree/main/US_Term_Structure
69
+ - Bundle: https://huggingface.co/datasets/Real-TSF/TIME-ProcessedCSV
70
+ - License: apache-2.0
us_term_structure.tsfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ffd3332a543926fd2e95a7c36e6a1cea3f1ac3fdde012e71563c9d7cf1094733
3
+ size 1468400