Add TsFile (converted from SanuthK/Wofost-Synthetic-Rice-Simulation-LK)
Browse files1234567891011121314151617181920212223242526272829303132333435# wofost_rice_lk从 HuggingFace 数据集 [`SanuthK/Wofost-Synthetic-Rice-Simulation-LK`](https://huggingface.co/datasets/SanuthK/Wofost-Synthetic-Rice-Simulation-LK) 转换为 TsFile 格式。## 来源- **原始数据集**:[SanuthK/Wofost-Synthetic-Rice-Simulation-LK](https://huggingface.co/datasets/SanuthK/Wofost-Synthetic-Rice-Simulation-LK)- **原作者**:Wanniarachchi S. K. (AgroGate Project)- **许可证**:cc-by-4.0Conversion notes:- Source: SanuthK/Wofost-Synthetic-Rice-Simulation-LK, single parquet (578,394 daily rows).- Synthetic daily rice growth simulations for Sri Lanka (WOFOST 7.2 water-limited model).- TAG (device): Season/Year/Lat/Lon/Irrigation/Nitrogen + a synthesized `replicate` index.Each simulation = one device (3250 total). The 6 scenario columns are stored as tagsonly, NOT duplicated as numeric fields.- `replicate` is synthesized: a scenario has multiple replicates (randomized weather) withno explicit replicate ID; they are concatenated and detected by Date resets (Date goingbackwards). Verified: with replicate, device count = 3250 and (device, Date) is unique.- Time: from `Date` (YYYY-MM-DD) parsed to INT64 ms.- FIELD: DVS/LAI/Biomass/Height_cm/Yield_kgha/NDVI/NDRE/S1_VV_dB/S1_VH_dB/S1_ratio (DOUBLE).Yield_kgha is NaN before flowering (DVS>=1) — preserved as null (NOT dropped/filled).- No source columns dropped: all 17 columns preserved (Date->Time, 6 scenario->tags, 10 fields).## 转换说明- 转换路径:`script`- 时间精度:`ms`- 自定义脚本:`scripts/converters/wofost_rice_lk.py`## 用法```python# 用 TsFile Java/Python SDK 读取 data.tsfile```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960---language:- enlicense: cc-by-4.0tags:- agriculture- crop-simulation- remote-sensing- synthetic-data- timeseries- tsfile- wofost- rice- sri-lankatask_categories:- time-series-forecasting- tabular-regressionpretty_name: Sri Lanka Paddy Rice WOFOST Simulation (TsFile)---# Wofost Synthetic Rice Simulation LK (TsFile)斯里兰卡水稻 WOFOST 7.2 合成模拟数据集,从 HuggingFace 数据集[`SanuthK/Wofost-Synthetic-Rice-Simulation-LK`](https://huggingface.co/datasets/SanuthK/Wofost-Synthetic-Rice-Simulation-LK)转换为 [Apache TsFile](https://tsfile.apache.org/) 格式。## 文件- `wofost_rice_lk.tsfile` —— 578,394 条日records,3,250 条独立模拟序列。## TsFile 表模型映射- **TAG(device)**:`Season` / `Year` / `Lat` / `Lon` / `Irrigation` / `Nitrogen` +合成的 `replicate` 序号。每条 simulation = 一个 device(共 3,250 个)。这 6 个 scenario列仅作 tag,不重复存为数值 field。- **Time**:由 `Date`(YYYY-MM-DD)解析为 INT64 毫秒。- **FIELD**:`DVS` / `LAI` / `Biomass` / `Height_cm` / `Yield_kgha` / `NDVI` / `NDRE` /`S1_VV_dB` / `S1_VH_dB` / `S1_ratio`(均为 DOUBLE)。`Yield_kgha` 在开花(DVS≥1)前为NaN,保留为 null。## 转换说明- **未丢弃任何源列**:17 列全部保留(Date→Time,6 个 scenario→tag,10 个数值→field)。- **`replicate` 为合成列**:同一 scenario 有多个 replicate(天气随机化),但原数据无显式replicate ID。多个 replicate 顺序拼接,在 Date 回退处分界,据此累计出 replicate 序号。验证:加上 replicate 后 device 数 = 3,250,`(device, Date)` 完全唯一。- 转换路径:`script`(`scripts/converters/wofost_rice_lk.py`),时间精度 `ms`。- 行数转换前后一致(578,394),已通过行数比对 + 读回校验,无去重、无丢行。> 关于体积:原始 parquet 约 16 MB,转换后 tsfile 约 21 MB。源数据约 51% 的数值单元为> NaN(出苗/开花前),parquet 用 RLE 把这些 NaN 游程压到近乎为零;TsFile 因按 device 切分> (3,250 个 device × 10 列 ≈ 3.2 万个小 chunk)元数据开销较高、对 NaN 游程压缩较弱,故略大。> 两者数据完全一致。## 来源- 原始数据集:[SanuthK/Wofost-Synthetic-Rice-Simulation-LK](https://huggingface.co/datasets/SanuthK/Wofost-Synthetic-Rice-Simulation-LK)- 原作者:Wanniarachchi S. K.(AgroGate Project)- 模型:PCSE / WOFOST 7.2;天气:NASA POWER- 许可证:CC-BY 4.0
README.md+60-35