--- 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 - Source file used for conversion: `videostats.csv` - Split used: `train` - Local downloaded rows: 1,541,128 - Distinct `ytvideoid` values in the downloaded file: 11,369 - Time range in the downloaded file: `2019-04-15 04:42:49` to `2020-04-14 23:31:06` 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.