CoolFace
Datasetpublic

THULab/SpatialEpiBench

SpatialEpiBench TsFile This repository contains a TsFile conversion of the Hugging Face dataset ruiqil/SpatialEpiBench. The description below separates information taken from the original dataset card from the changes made during this TsFile conversion. ⚠️ About the Dataset Viewer The Hugging Face dataset viewer is disabled for this repository on purpose. The actual data lives in 11 .tsfile files (Apache IoTDB TsFile, a binary time-series format). The HF viewer… See the full description on the dataset page: https://huggingface.co/datasets/THULab/SpatialEpiBench.

sourceHugging Facecc-by-4.0updated 1mo agoView on Hugging Face
0likes151downloads
Dataset Card

SpatialEpiBench TsFile

This repository contains a TsFile conversion of the Hugging Face dataset `ruiqil/SpatialEpiBench`.

The description below separates information taken from the original dataset card from the changes made during this TsFile conversion.

⚠️ About the Dataset Viewer

The Hugging Face dataset viewer is disabled for this repository on purpose.

The actual data lives in 11 `.tsfile` files (Apache IoTDB TsFile, a binary time-series format). The HF viewer does not support .tsfile, so it cannot render the real data. The only files the viewer could auto-preview are the sidecar .csv files (adjacency/*_adj.csv, column_mapping.csv, conversion_summary.csv) — but those are static graph/metadata tables, not the time-series data. Showing them would misrepresent this dataset as having no timestamps, so the viewer is turned off (viewer: false).

Each .tsfile does contain a proper time axis. Below is a real preview read back from AUcase/AUcase.tsfile (millisecond Time plus regional case counts; only 4 of 8 regions shown for width):

Time (epoch ms)Time (UTC)australian_capital_territorynew_south_walesqueenslandvictoria
15856992000002020-04-0141503851
15857856000002020-04-0231165468
15858720000002020-04-034913849
15859584000002020-04-0421042730
15860448000002020-04-05387720

To read a .tsfile, use the TsFile SDK (Python or Java):

python
from tsfile import TsFileReader, ColumnCategory

reader = TsFileReader("AUcase/AUcase.tsfile")
schemas = reader.get_all_table_schemas()
table = next(iter(schemas))                      # e.g. "aucase"
fields = [c.get_column_name() for c in schemas[table].get_columns()
          if c.get_category() in (ColumnCategory.FIELD, ColumnCategory.TAG)]
with reader.query_table(table, fields, batch_size=65536) as rs:
    batch = rs.read_arrow_batch()                # Arrow batch; includes the `time` column
    print(batch.to_pandas().head())

Original Dataset Information

Original dataset: <https://huggingface.co/datasets/ruiqil/SpatialEpiBench>

According to the original dataset README, SpatialEpiBench is a benchmark collection of 11 spatiotemporal epidemic forecasting datasets. It covers public-health surveillance modalities including influenza-like illness surveillance rates, confirmed cases, test positivity, inpatient and outpatient hospitalizations, hospital admissions, doctor visits, and deaths. The datasets span the United States, Canada, and Australia, with daily or weekly temporal resolution depending on the data source.

The original repository provides each time-series dataset as a CSV file, paired with a corresponding spatial adjacency matrix in a _adj.csv file. The original dataset card declares license CC-BY-4.0.

Original dataset overview from the source README:

DatasetFrequencyCountryModalityTime
AUcasedailyAustraliacases2020-2021
CAcasedailyCanadacases2020-2021
CANpositivitydailyU.S.test positivity2020-2021
CHNGinpatientdailyU.S.inpatient hospitalizations2020-2024
CHNGoutpatientdailyU.S.outpatient visits2020-2024
CPRadmissionsdailyU.S.hospital admissions2020-2023
DVclidailyU.S.doctor visits2020-present
HHShospdailyU.S.hospitalizations2021-2024
ILI2019weeklyU.S.surveillance rate2010-present
JHUcasedailyU.S.cases2020-2023
NCHSdeathsweeklyU.S.deaths2020-present

Converted Files

Each original time-series CSV was converted into one TsFile. The conversion keeps the original wide-table layout as closely as possible: each regional CSV column remains a measurement column in the matching TsFile.

Source CSVTsFileSource rowsRegionsSource time columnFirst timeLast timeMissing source valuesRenamed region columns
AUcase.csvAUcase/AUcase.tsfile6408time_value2020-04-012021-12-3105
CAcase.csvCAcase/CAcase.tsfile64013time_value2020-04-012021-12-3106
CANpositivity.csvCANpositivity/CANpositivity.tsfile64251time_value2020-03-012021-12-023180
CHNGinpatient.csvCHNGinpatient/CHNGinpatient.tsfile130951time_value2020-01-012023-08-01340
CHNGoutpatient.csvCHNGoutpatient/CHNGoutpatient.tsfile130951time_value2020-01-012023-08-0100
CPRadmissions.csvCPRadmissions/CPRadmissions.tsfile64451time_value2020-12-162023-02-2100
DVcli.csvDVcli/DVcli.tsfile216251time_value2020-02-012026-01-0100
HHShosp.csvHHShosp/HHShosp.tsfile97851time_value2021-08-232024-04-2600
ILI2019.csvILI2019/ILI2019.tsfile48152time2010-10-032019-12-2900
JHUcase.csvJHUcase/JHUcase.tsfile73051time_value2020-04-012022-03-3100
NCHSdeaths.csvNCHSdeaths/NCHSdeaths.tsfile31051time_value2020-01-262025-12-289910

Conversion Changes

Compared with the original CSV layout, this conversion made these changes:

  • One source time-series CSV was converted to one TsFile, resulting in 11 TsFile files.
  • The original date/week column (time_value, or time for ILI2019) was parsed into the TsFile Time column at millisecond precision.
  • Regional measurement columns were kept as wide measurement columns.
  • Region column names containing spaces or other schema-unsafe characters were normalized for TsFile/schema parsing, for example spaces were replaced with underscores. The full mapping is provided in column_mapping.csv.
  • Missing numeric values from the source CSV files remain null/missing in the staged Parquet input. The TsFile import represents these as absent values for the affected measurement/time.
  • The _adj.csv spatial adjacency matrices were not written into TsFile because they are static graph metadata, not time-varying measurements. They are preserved unchanged under adjacency/.
  • The original dataset README is included as SOURCE_DATASET_README.md for reference.

No image, video, audio, or other media files were present in the source repository. The source files are CSV tables.

Sidecar Files

  • adjacency/*.csv: original spatial adjacency matrices copied from the source dataset.
  • column_mapping.csv: original region column names and their TsFile-safe measurement names.
  • conversion_summary.csv: row/region/missing-value summary computed from the source CSV files used for this conversion.
  • SOURCE_DATASET_README.md: original Hugging Face dataset README downloaded from the source repository.

Validation Summary

  • Source value cells across all main CSV files: 450736
  • Missing source value cells: 1343
  • Region columns renamed for TsFile compatibility: 11
  • All 11 generated .tsfile files were validated locally as present and non-empty.