|
Download README.md from wangdx25/hvac_sensor_data: direct link, hf CLI and curl.
- Browser
- Download file 3.48 kB
-
https://huggingface.co/datasets/wangdx25/hvac_sensor_data/resolve/main/README.md
- Command line
-
hf download hf://datasets/wangdx25/hvac_sensor_data/README.md
-
curl -L -o README.md https://huggingface.co/datasets/wangdx25/hvac_sensor_data/resolve/main/README.md
3.48 kB
metadata
license: mit
tags:
- tsfile
- timeseries
- time-series
- format:tsfile
pretty_name: hvac_sensor_data (TsFile)
configs:
- config_name: default
data_files:
- split: train
path: hvac_sensor_data.tsfile
hvac_sensor_data (TsFile)
Apache TsFile version of jeorgexyz/hvac_sensor_data.
Overview
- Tables: 1 TsFile table(s), 112,320 rows in total.
hvac_sensor_data: 112,320 rows, 2024-11-24 03:05:32.553000 鈫?2024-12-24 03:00:32.553000 (UTC)
Schema (TsFile structure)
hvac_sensor_data.tsfile
- Time (INT64, milliseconds) 鈥?the source
timestampcolumn. - TAG:
equipment_id鈥?device dimension; query one device withWHERE equipment_id=.... - FIELD (10):
equipment_type(string),temperature_c(double),pressure_kpa(double),humidity_pct(double),airflow_cfm(double),fan_speed_pct(double),filter_status(double),damper_position_pct(double),zone_occupancy(double),sensor_status(double)
Conversion notes
- One TsFile per source table (1 tables). Tables whose source carries several entities per file are stored as one device per entity, using
equipment_idas the TAG. - Time = the table's own clock column as INT64 milliseconds. The clock columns used here are
timestamp. - 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
zstdcompressor. The Apache TsFile Java SDK reads every compressor, but the Python SDK (pip install tsfile) implements onlyUNCOMPRESSED,SNAPPY,GZIPandLZ4; opening this file with it yields no rows.
Read a converted file with the Apache TsFile Java SDK (org.apache.tsfile:tsfile):
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 = "hvac_sensor_data.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:
jeorgexyz/hvac_sensor_data - License: mit (as declared by the original dataset).