Datasets:
Add TsFile (converted from zaai-ai/time_series_datasets)
Browse files- .gitattributes +1 -0
- README.md +91 -0
- time_series_datasets.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 |
+
time_series_datasets.tsfile filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license:
|
| 3 |
+
- cc-by-4.0
|
| 4 |
+
task_categories:
|
| 5 |
+
- time-series-forecasting
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- tsfile
|
| 10 |
+
- timeseries
|
| 11 |
+
- time-series
|
| 12 |
+
- format:tsfile
|
| 13 |
+
pretty_name: time_series_datasets (TsFile)
|
| 14 |
+
size_categories:
|
| 15 |
+
- 10K<n<100k
|
| 16 |
+
configs:
|
| 17 |
+
- config_name: default
|
| 18 |
+
data_files:
|
| 19 |
+
- split: train
|
| 20 |
+
path: time_series_datasets.tsfile
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# time_series_datasets (TsFile)
|
| 24 |
+
|
| 25 |
+
Apache TsFile version of [`zaai-ai/time_series_datasets`](https://huggingface.co/datasets/zaai-ai/time_series_datasets).
|
| 26 |
+
|
| 27 |
+
## Overview
|
| 28 |
+
|
| 29 |
+
This dataset, originally sourced from Athanasopoulos et al. (2011), focuses on the tourism industry with a monthly frequency and has been enhanced with economic covariates (e.g., CPI, Inflation Rate, GDP) from official Australian government sources. We also perform some preprocessing to further increase the usability of the dataset with dynamic start dates for each series and static covariates for in-depth time series forecasting and analysis in the context of tourism and its economic impacts.
|
| 30 |
+
|
| 31 |
+
- **Tables:** 1 TsFile table(s), 69,114 rows in total.
|
| 32 |
+
- `time_series_datasets`: 69,114 rows, 1998-01-01 00:00:00 鈫?2016-12-01 00:00:00.303000 (UTC)
|
| 33 |
+
|
| 34 |
+
## Schema (TsFile structure)
|
| 35 |
+
|
| 36 |
+
### `time_series_datasets.tsfile`
|
| 37 |
+
|
| 38 |
+
- **Time** (INT64, milliseconds) 鈥?the source `Date` column.
|
| 39 |
+
- **TAG**: none 鈥?the table is stored as a single device.
|
| 40 |
+
- **FIELD** (10): `Unnamed_0` (int64), `unique_id` (string), `visits` (double), `CPI` (double), `Inflation_Rate` (double), `GDP` (double), `static_1` (string), `static_2` (string), `static_3` (string), `static_4` (string)
|
| 41 |
+
|
| 42 |
+
## Conversion notes
|
| 43 |
+
|
| 44 |
+
- One TsFile per source table (1 tables). Tables whose source carries several entities per file are stored as one device per entity, using `unique_id` as the TAG.
|
| 45 |
+
- Time = the table's own clock column as INT64 milliseconds. The clock columns used here are `Date`.
|
| 46 |
+
- No column is dropped. Rows that share a timestamp inside one device are ordered by a 1 ms step in stable source order, so calendar columns keep their exact day.
|
| 47 |
+
|
| 48 |
+
## Usage
|
| 49 |
+
|
| 50 |
+
> **Read this dataset with the Java SDK.** It is written with the `zstd` compressor. The Apache TsFile Java SDK reads every compressor, but the Python SDK (`pip install tsfile`) implements only `UNCOMPRESSED`, `SNAPPY`, `GZIP` and `LZ4`; opening this file with it yields no rows.
|
| 51 |
+
|
| 52 |
+
Read a converted file with the Apache TsFile Java SDK (`org.apache.tsfile:tsfile`):
|
| 53 |
+
|
| 54 |
+
```java
|
| 55 |
+
import org.apache.tsfile.file.metadata.IDeviceID;
|
| 56 |
+
import org.apache.tsfile.read.TsFileReader;
|
| 57 |
+
import org.apache.tsfile.read.TsFileSequenceReader;
|
| 58 |
+
import org.apache.tsfile.read.common.Path;
|
| 59 |
+
import org.apache.tsfile.read.expression.QueryExpression;
|
| 60 |
+
import org.apache.tsfile.read.query.dataset.QueryDataSet;
|
| 61 |
+
import org.apache.tsfile.write.schema.MeasurementSchema;
|
| 62 |
+
|
| 63 |
+
import java.util.ArrayList;
|
| 64 |
+
import java.util.List;
|
| 65 |
+
|
| 66 |
+
String path = "time_series_datasets.tsfile";
|
| 67 |
+
try (TsFileSequenceReader sequenceReader = new TsFileSequenceReader(path);
|
| 68 |
+
TsFileReader reader = new TsFileReader(sequenceReader)) {
|
| 69 |
+
// Devices are enumerated as IDeviceID objects. Tables with TAG columns
|
| 70 |
+
// have multi-segment device ids that cannot be rebuilt from their string
|
| 71 |
+
// form, so always use getAllDevices() rather than getAllDeviceIds().
|
| 72 |
+
for (IDeviceID device : sequenceReader.getAllDevices()) {
|
| 73 |
+
List<Path> paths = new ArrayList<>();
|
| 74 |
+
for (MeasurementSchema schema : reader.getMeasurement(device)) {
|
| 75 |
+
String name = schema.getMeasurementName();
|
| 76 |
+
if (name != null && !name.isEmpty() && !name.equalsIgnoreCase("Time")) {
|
| 77 |
+
paths.add(new Path(device, name, true));
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
QueryDataSet dataSet = reader.query(QueryExpression.create(paths, null));
|
| 81 |
+
while (dataSet.hasNext()) {
|
| 82 |
+
System.out.println(dataSet.next());
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
## Source & license
|
| 89 |
+
|
| 90 |
+
- Original dataset: [`zaai-ai/time_series_datasets`](https://huggingface.co/datasets/zaai-ai/time_series_datasets)
|
| 91 |
+
- License: ['cc-by-4.0'] (as declared by the original dataset).
|
time_series_datasets.tsfile
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:485eb80734947d705f5a9bf6997043419d1d2fe0351d33028e0d0cb203b558ae
|
| 3 |
+
size 538870
|