Datasets:
Add TsFile (converted from An-j96/SuperstoreData)
Browse files- .gitattributes +1 -0
- README.md +91 -0
- superstore_data.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 |
+
superstore_data.tsfile filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: "Superstore Sales POS (TsFile)"
|
| 3 |
+
modality: timeseries
|
| 4 |
+
authors: "An-j96"
|
| 5 |
+
task_categories:
|
| 6 |
+
- time-series-forecasting
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1K<n<10K
|
| 9 |
+
tags:
|
| 10 |
+
- tsfile
|
| 11 |
+
- timeseries
|
| 12 |
+
- modality:timeseries
|
| 13 |
+
- format:tsfile
|
| 14 |
+
- finance
|
| 15 |
+
configs:
|
| 16 |
+
- config_name: default
|
| 17 |
+
data_files:
|
| 18 |
+
- split: train
|
| 19 |
+
path: "superstore_data.tsfile"
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# Superstore Sales POS (TsFile)
|
| 23 |
+
|
| 24 |
+
This dataset is an Apache TsFile conversion of
|
| 25 |
+
[`An-j96/SuperstoreData`](https://huggingface.co/datasets/An-j96/SuperstoreData).
|
| 26 |
+
|
| 27 |
+
Modalities: Time-series.
|
| 28 |
+
|
| 29 |
+
## Overview
|
| 30 |
+
|
| 31 |
+
- Superstore point-of-sale transactions for sales/demographics forecasting.
|
| 32 |
+
- Each order records segment, category, region, ship mode, and sale metrics (`Sales`, `Quantity`, `Discount`, `Profit`).
|
| 33 |
+
- Order dimensions are device TAGs; sales metrics are FIELDs.
|
| 34 |
+
|
| 35 |
+
- Converted observations: 9,994 rows across 1 TsFile file(s)
|
| 36 |
+
- Source format: csv
|
| 37 |
+
|
| 38 |
+
## TsFile schema
|
| 39 |
+
|
| 40 |
+
- **Time** — source `Order Date` (`%m/%d/%Y`), converted to INT64 milliseconds.
|
| 41 |
+
|
| 42 |
+
| Column | Role | Type | Meaning |
|
| 43 |
+
|---|---|---|---|
|
| 44 |
+
| `Time` | TIME | INT64 (ms) | sample timestamp |
|
| 45 |
+
| `Row_ID` | TAG | STRING | order id |
|
| 46 |
+
| `Segment` | TAG | STRING | customer segment |
|
| 47 |
+
| `Category` | TAG | STRING | product category |
|
| 48 |
+
| `Region` | TAG | STRING | region |
|
| 49 |
+
| `Ship_Mode` | TAG | STRING | shipping mode |
|
| 50 |
+
| `Sales` | FIELD | FLOAT | sales amount |
|
| 51 |
+
| `Quantity` | FIELD | FLOAT | quantity |
|
| 52 |
+
| `Discount` | FIELD | FLOAT | discount |
|
| 53 |
+
| `Profit` | FIELD | FLOAT | profit |
|
| 54 |
+
|
| 55 |
+
## Conversion notes
|
| 56 |
+
|
| 57 |
+
- `Row_ID`, `Segment`, `Category`, `Region`, `Ship_Mode` kept as TAGs; `Sales`/`Quantity`/`Discount`/`Profit` as FLOAT/INT64 FIELDs.
|
| 58 |
+
|
| 59 |
+
## Source & license
|
| 60 |
+
|
| 61 |
+
- Original dataset: https://huggingface.co/datasets/An-j96/SuperstoreData
|
| 62 |
+
- Author / publisher: An-j96
|
| 63 |
+
- License: gpl-2.0
|
| 64 |
+
|
| 65 |
+
## Usage
|
| 66 |
+
|
| 67 |
+
Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file:
|
| 68 |
+
|
| 69 |
+
```python
|
| 70 |
+
from pathlib import Path
|
| 71 |
+
from tsfile import TsFileReader
|
| 72 |
+
|
| 73 |
+
path = Path("superstore_data.tsfile")
|
| 74 |
+
with TsFileReader(str(path)) as reader:
|
| 75 |
+
schemas = reader.get_all_table_schemas()
|
| 76 |
+
print("tables:", list(schemas))
|
| 77 |
+
table_name = next(iter(schemas))
|
| 78 |
+
table = schemas[table_name]
|
| 79 |
+
columns = [column.get_column_name() for column in table.get_columns()]
|
| 80 |
+
print("columns:", columns)
|
| 81 |
+
field_names = [
|
| 82 |
+
column.get_column_name()
|
| 83 |
+
for column in table.get_columns()
|
| 84 |
+
if column.get_column_name() not in {"Time", "time"}
|
| 85 |
+
]
|
| 86 |
+
if field_names:
|
| 87 |
+
with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
|
| 88 |
+
batch = result.read_arrow_batch()
|
| 89 |
+
if batch is not None:
|
| 90 |
+
print(batch.to_pandas().head())
|
| 91 |
+
```
|
superstore_data.tsfile
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e450f8e1ba2ccc6fac9c331490328715d2bcf93cdf89d2bf9ee59887decbfe92
|
| 3 |
+
size 6029087
|