Datasets:
File size: 3,984 Bytes
8363b4d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | ---
license: apache-2.0
language:
- en
multilinguality:
- monolingual
task_categories:
- time-series-forecasting
tags:
- tsfile
- timeseries
- modality:timeseries
- format:tsfile
- finance
- crypto
- trading
- blockchain
modality: timeseries
pretty_name: CryptoData Dataset (TsFile format)
configs:
- config_name: default
data_files:
- split: train
path: "crypto_data.tsfile"
---
# CryptoData Dataset (TsFile format)
CryptoData is a collection of cryptocurrency market data intended for price
prediction, market trend analysis, and historical analysis. The source card
describes default, close, indicators, and sequences configurations. At the
pinned source revision, the available data files are the daily candle CSVs;
the converted artifact therefore documents and contains the available candle
data only.
Modalities: Time-series
## Source and scale
- Original dataset: [sebdg/crypto_data](https://huggingface.co/datasets/sebdg/crypto_data)
- Source revision: 9767bde1e557d1aef9bb70808ce5642493c11574
- Source layout: 298 files under candles/*.csv; 294 contain observations.
- Converted scale: 216,226 rows from 294 markets, with a dominant daily cadence.
- There is no predefined train/validation/test split.
- Four files are header-only: ASTR-EUR.csv, BLZ-EUR.csv, ONDO-EUR.csv, and
SSV-EUR.csv. They contribute zero rows and are not represented as empty
devices.
## TsFile schema
| Column | Role | TsFile type | Source meaning |
|---|---|---|---|
| Time | TIME | INT64 (ms) | Source time, epoch milliseconds |
| market | TAG | STRING | Market identifier, for example BTC-EUR |
| open | FIELD | DOUBLE | Opening price |
| high | FIELD | DOUBLE | High price |
| low | FIELD | DOUBLE | Low price |
| close | FIELD | DOUBLE | Closing price |
| volume | FIELD | DOUBLE | Traded volume |
## Conversion notes
- Every non-empty candle file is combined into one logical table and sorted by
market, then ascending Time.
- Source integer epoch-millisecond time is renamed to Time without changing its
value. The source market column is the device TAG.
- OHLCV values are retained as numeric fields; no rows or semantic measurements
are dropped. Header-only files are excluded solely because they contain no
observations.
- Indicators and sequence arrays described in the source card are not claimed
because their generated files are absent at this pinned revision.
## Files and usage
- crypto_data.tsfile
~~~python
from pathlib import Path
from tsfile import TsFileReader
path = Path("crypto_data.tsfile")
with TsFileReader(str(path)) as reader:
schemas = reader.get_all_table_schemas()
table_name = next(iter(schemas))
with reader.query_table(table_name, ["close", "volume"], batch_size=1024) as result:
batch = result.read_arrow_batch()
if batch is not None:
print(batch.to_pandas().head())
~~~
## License and attribution
The source dataset is released under the Apache-2.0 license. See the
[original dataset card](https://huggingface.co/datasets/sebdg/crypto_data) for
the source description and usage context.
## Usage
Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file:
```python
from pathlib import Path
from tsfile import TsFileReader
path = Path("crypto_data.tsfile")
with TsFileReader(str(path)) as reader:
schemas = reader.get_all_table_schemas()
print("tables:", list(schemas))
table_name = next(iter(schemas))
table = schemas[table_name]
columns = [column.get_column_name() for column in table.get_columns()]
print("columns:", columns)
field_names = [
column.get_column_name()
for column in table.get_columns()
if column.get_column_name() not in {"Time", "time"}
]
if field_names:
with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
batch = result.read_arrow_batch()
if batch is not None:
print(batch.to_pandas().head())
```
|