currydata / README.md
THUgewu's picture
Copy from wangdx25/currydata
0f20255 verified
|
Raw History Blame Contribute Delete
4.62 kB
---
task_categories:
- time-series-forecasting
language:
- en
tags:
- tsfile
- timeseries
- time-series
- NBA
- format:tsfile
pretty_name: currydata (TsFile)
configs:
- config_name: default
data_files:
- split: train
path: currydata.tsfile
---
# currydata (TsFile)
Apache TsFile version of [`jawwaadsabree/CurryData`](https://huggingface.co/datasets/jawwaadsabree/CurryData).
## Overview
This dataset card aims to be a base template for new datasets. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/datasetcard_template.md?plain=1).
- **Tables:** 1 TsFile table(s), 1,205 rows in total.
- `currydata`: 1,205 rows, 2009-10-28 00:00:00 鈫?2025-04-15 00:00:00 (UTC)
## Schema (TsFile structure)
### `currydata.tsfile`
- **Time** (INT64, milliseconds) 鈥?the source `Date` column.
- **TAG**: none 鈥?the table is stored as a single device.
- **FIELD** (58): `Result` (int64), `MIN` (int64), `REB` (int64), `AST` (int64), `BLK` (int64), `STL` (int64), `PF` (int64), `TO` (int64), `PTS` (int64), `FG_Made` (int64), `FG_Attempts` (int64), `c_3PT_Made` (int64), `c_3PT_Attempts` (int64), `FT_Made` (int64), `FT_Attempts` (int64), `Opponent_1` (int64), `Opponent_2` (int64), `Opponent_3` (int64), `Opponent_4` (int64), `Opponent_5` (int64), `Opponent_6` (int64), `Opponent_7` (int64), `Opponent_8` (int64), `Opponent_9` (int64), `Opponent_10` (int64), `Opponent_11` (int64), `Opponent_12` (int64), `Opponent_13` (int64), `Opponent_14` (int64), `Opponent_15` (int64), `Opponent_16` (int64), `Opponent_17` (int64), `Opponent_18` (int64), `Opponent_19` (int64), `Opponent_20` (int64), `Opponent_21` (int64), `Opponent_22` (int64), `Opponent_23` (int64), `Opponent_24` (int64), `Opponent_25` (int64), `Opponent_26` (int64), `Opponent_27` (int64), `Opponent_28` (int64), `Opponent_29` (int64), `Opponent_30` (int64), `Is_Home` (int64), `Year` (int64), `Month_Sin` (double), `Month_Cos` (double), `Day_Sin` (double), `Day_Cos` (double), `Day_of_Week_Sin` (double), `Day_of_Week_Cos` (double), `Day_of_Year_Sin` (double), `Day_of_Year_Cos` (double), `Is_Playoff` (int64), `Is_Regular_Season` (int64), `Is_Preseason` (int64)
## Conversion notes
- One TsFile per source table (1 tables). Tables whose source carries several entities per file are stored as one device per entity.
- Time = the table's own clock column as INT64 milliseconds. The clock columns used here are `Date`.
- 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.
## Usage
> **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.
Read a converted file with the Apache TsFile Java SDK (`org.apache.tsfile:tsfile`):
```java
import org.apache.tsfile.file.metadata.IDeviceID;
import org.apache.tsfile.read.TsFileReader;
import org.apache.tsfile.read.TsFileSequenceReader;
import org.apache.tsfile.read.common.Path;
import org.apache.tsfile.read.expression.QueryExpression;
import org.apache.tsfile.read.query.dataset.QueryDataSet;
import org.apache.tsfile.write.schema.MeasurementSchema;
import java.util.ArrayList;
import java.util.List;
String path = "currydata.tsfile";
try (TsFileSequenceReader sequenceReader = new TsFileSequenceReader(path);
TsFileReader reader = new TsFileReader(sequenceReader)) {
// Devices are enumerated as IDeviceID objects. Tables with TAG columns
// have multi-segment device ids that cannot be rebuilt from their string
// form, so always use getAllDevices() rather than getAllDeviceIds().
for (IDeviceID device : sequenceReader.getAllDevices()) {
List<Path> paths = new ArrayList<>();
for (MeasurementSchema schema : reader.getMeasurement(device)) {
String name = schema.getMeasurementName();
if (name != null && !name.isEmpty() && !name.equalsIgnoreCase("Time")) {
paths.add(new Path(device, name, true));
}
}
QueryDataSet dataSet = reader.query(QueryExpression.create(paths, null));
while (dataSet.hasNext()) {
System.out.println(dataSet.next());
}
}
}
```
## Source & license
- Original dataset: [`jawwaadsabree/CurryData`](https://huggingface.co/datasets/jawwaadsabree/CurryData)
- License: not declared (as declared by the original dataset).