|
Download README.md from wangdx25/floodstack_test: direct link, hf CLI and curl.
- Browser
- Download file 3.98 kB
-
https://huggingface.co/datasets/wangdx25/floodstack_test/resolve/main/README.md
- Command line
-
hf download hf://datasets/wangdx25/floodstack_test/README.md
-
curl -L -o README.md https://huggingface.co/datasets/wangdx25/floodstack_test/resolve/main/README.md
3.98 kB
| tags: | |
| - tsfile | |
| - timeseries | |
| - time-series | |
| - format:tsfile | |
| pretty_name: floodstack_test (TsFile) | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: floodstack_test_g0.tsfile | |
| - split: train | |
| path: floodstack_test_g1.tsfile | |
| # floodstack_test (TsFile) | |
| Apache TsFile version of [`harshithvaranasi/floodstack_test`](https://huggingface.co/datasets/harshithvaranasi/floodstack_test). | |
| ## Overview | |
| - **Tables:** 2 TsFile table(s), 255,650 rows in total. | |
| - `floodstack_test_g0`: 36,500 rows, 2022-01-01 00:00:00 鈫?2023-12-31 00:00:00.049000 (UTC) | |
| - `floodstack_test_g1`: 219,150 rows, 2010-01-01 00:00:00 鈫?2021-12-31 00:00:00.049000 (UTC) | |
| ## Schema (TsFile structure) | |
| ### `floodstack_test_g0.tsfile` | |
| - **Time** (INT64, milliseconds) 鈥?the source `date` column. | |
| - **TAG**: none 鈥?the table is stored as a single device. | |
| - **FIELD** (9): `station_id` (int64), `precipitation_mm` (double), `temp_max_c` (double), `temp_min_c` (double), `soil_moisture` (double), `drainage_area_sqmi` (double), `mean_elevation_ft` (double), `slope_pct` (double), `forest_cover_pct` (double) | |
| ### `floodstack_test_g1.tsfile` | |
| - **Time** (INT64, milliseconds) 鈥?the source `date` column. | |
| - **TAG**: none 鈥?the table is stored as a single device. | |
| - **FIELD** (10): `station_id` (int64), `precipitation_mm` (double), `temp_max_c` (double), `temp_min_c` (double), `soil_moisture` (double), `drainage_area_sqmi` (double), `mean_elevation_ft` (double), `slope_pct` (double), `forest_cover_pct` (double), `discharge_cfs` (double) | |
| ## Conversion notes | |
| - One TsFile per source table (2 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 = "floodstack_test_g0.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: [`harshithvaranasi/floodstack_test`](https://huggingface.co/datasets/harshithvaranasi/floodstack_test) | |
| - License: not declared (as declared by the original dataset). | |