QNQuin Nguyen View code ↗
· Personal analytics

My YouTube,
rewound.

I exported 2.5 years of my own watch history from Google Takeout and analyzed it with Python and SQL. The pipeline removes ads, works out which country I was in from my sleep pattern, and classifies the language of every video.

Python · JSON · regexTime-zone inference SQLiteSQL window functionsSVG charts
Videos watched
Were ads
Plays were replays
Mostly music on repeat
Different channels
Timeline

Two homes, one watch history

Detected in Chicago Detected in Vietnam
Language

Coming back to Vietnamese

Vietnamese English Korean / Japanese
Chicago vs. Vietnam

Homesick, in numbers

Channel loyalty

A long tail with a loyal core

On repeat

The replay habit

Rhythm

A night watcher

Sessions

Rare binges, big share

How it works

Method

1 · Cleaning

Takeout lists ads in the same file as real videos. The pipeline drops every entry tagged “From Google Ads” and anything that isn’t a watched video.

2 · Time zones

Takeout stores every time in UTC. For each month, the script tests Vietnam (UTC+7) and Chicago (UTC−5/−6) and picks the zone where I was least active from 2am to 8am. The result matches my real calendar.

3 · Language

Each title is classified with regex: Vietnamese diacritics, Korean Hangul or Japanese kana. Everything else counts as English.

4 · Sessions

SQL window functions (LAG plus a running SUM) start a new session after a 30-minute gap. The raw history never leaves my laptop.