smilegeng's picture
chore: normalize tsfile dataset metadata
cffe56d verified
|
Raw
History Blame Contribute Delete
3.21 kB
metadata
pretty_name: YouTube Trending Video Statistics 2019-04-15 to 2020-04-15 TsFile
language:
  - en
tags:
  - tabular
  - youtube
  - tsd
  - trending videos
  - tsfile
  - modality:timeseries
modality:
  - timeseries
size_categories:
  - 1M<n<10M

youtube_trending_2019_2020

This repository contains a TsFile conversion of the Hugging Face dataset jettisonthenet/timeseries_trending_youtube_videos_2019-04-15_to_2020-04-15.

The source dataset card / Viewer identifies the dataset as a YouTube trending video time-series dataset. The source repository contains videostats.csv and the Hugging Face Viewer exposes the default/train split with about 1.54M rows. The locally downloaded source file used for this conversion contains 1,541,128 rows.

Original Dataset

The original columns are:

Column Description used in this conversion
videostatsid Source row/statistics identifier
ytvideoid YouTube video identifier
views View count
comments Comment count
likes Like count
dislikes Dislike count
timestamp Source timestamp

The source dataset does not contain video files, frames, audio, thumbnails, or other media binaries. ytvideoid is an identifier only.

TsFile Conversion

The conversion was performed from the source CSV into staged Parquet and then into TsFile using the repository workflow.

Generated files:

  • youtube_trending_2019_2020_1.tsfile
  • youtube_trending_2019_2020_2.tsfile

Schema-level conversion choices:

  • timestamp was parsed into the TsFile Time column at millisecond precision.
  • The original timestamp value was preserved as source_timestamp_ms.
  • ytvideoid was declared as a TAG, so each YouTube video ID is represented as a separate device series.
  • views, comments, likes, and dislikes were retained as INT64 fields.
  • videostatsid was retained as an INT64 field for traceability.
  • No original source columns were dropped.

Duplicate timestamp handling:

The source CSV contains 89 duplicate (ytvideoid, timestamp) pairs. TsFile requires timestamps within one device series to be unique/ordered for reliable import. For those duplicate pairs only, the converted Time value was disambiguated by adding a zero-based millisecond offset ordered by videostatsid. The unadjusted source timestamp remains available in source_timestamp_ms.

Validation

The staged Parquet file contains:

  • 1,541,128 rows
  • 11,369 distinct ytvideoid tag values
  • 0 duplicate (ytvideoid, Time) pairs after conversion

Both generated .tsfile files were validated locally as present and non-empty.