home/data projects/youtube trending
Data Story — 02

Going viral has a shelf life. It's about 38 hours.

I scraped 40,000 trending videos across ten regions to answer one nagging question: what actually earns a spot on the Trending page — and how fast does the magic wear off?

Role
Solo analysis
Stack
Python · pandas · sklearn
Source
YouTube Data API
Sample
40k videos · 10 regions
01 Overview

“Trending” feels permanent when you're scrolling it. It isn't. The board churns constantly, and most creators have no idea how short their window really is.

I wanted to treat the Trending page like a dataset instead of a vibe — pull every video on it, every day, across regions, and watch how positions appear, climb and evaporate. With enough snapshots, the lifecycle of a viral video stops being mysterious and starts being a curve you can plot.

02 The data

I hit the YouTube Data API on a schedule, capturing the full Trending list for ten regions every few hours over several weeks. Each snapshot recorded position, views, likes, comments, category, channel size and publish time.

0
Trending video snapshots collected across regions.
0
Median time a video survives on the board.
0
Longer life when the title contains a number.
03 Approach

I de-duplicated videos across snapshots into a single lifecycle per video, then engineered features — title length, presence of numbers and emoji, thumbnail face detection, publish hour, category and channel size. A gradient-boosted model did the heavy lifting on “what predicts longevity,” with the raw curves kept close by as a sanity check.

04 Key insights

Insight one: the lifecycle is front-loaded and brutal. Velocity in the first two hours decides almost everything.

View velocity over a video's life on Trending
relative · hours since posting
peak0h24h48h
Read: velocity spikes within hours, then decays steadily. By ~38 hours the typical video has slipped off the board entirely.

“The thumbnail and first two hours matter more than the channel's entire subscriber count.”

Insight two: clout is overrated. The signals creators obsess over barely move the needle.

When I ranked features by how much they predicted longevity, early velocity and a few cheap title-and-thumbnail tricks dominated. Subscriber count — the thing everyone chases — landed near the bottom.

What predicts how long a video trends
relative feature importance
First-2h velocity0.31
Number in title0.24
Face in thumbnail0.21
Category0.17
Publish 2–4pm0.13
Subscriber count0.06
Video length0.03
Read: momentum and packaging beat reach. A small channel with the right first hour outruns a big one without it.
05 What's next
  1. 01Run sentiment on titles and thumbnails to test whether curiosity gaps really do outperform plain description.
  2. 02Compare lifecycle curves across regions — does a video trend longer in some countries than others?
  3. 03Ship a tiny “trending odds” tool that scores a draft title and thumbnail before you hit publish.
06 Take a look