This is still a work in progress. Expect to see more content here soon.
Back Thumbnail for the project
Completed

YouTube Watch History Insights

Personal data visualization project transforming YouTube watch history into an interactive dashboard. Reveals viewing habits, content patterns, and platform usage through insightful charts and stats. Designed to make interpreting large and complex user data in a visual way that is easy to understand and digest. Built with React and Recharts, and built with Vite to be a single file, it provides a fast and efficient user experience.
Created: Sep 3, 2024
Updated: Apr 20, 2025
Visit Stamp
Web ApplicationData VisualizationPersonal ProjectData Analysis

Article Published: Apr 22, 2024

YouTubeWatchHistoryInsights

YouTube Watch History insights

This was eye-opening to see my data and see my habits in a new way

We all I spend hours on YouTube, and I knew that it was a bad habit. For a personal data exploration project, I decided to dive into my own YouTube watch history and transform that raw data into something meaningful and visual. The result is YouTube Watch History Insights, an interactive dashboard that reveals fascinating patterns and trends in my chronic content consumption!

Unlocking YouTube Data: From Raw History to Rich Insights

The first step was to get the data! YouTube doesn’t provide a way to download your watch history directly, but … I know how to use Inspect Element. With the network tab open, I scroll through the YouTube watch history page! Once I reach my desired ending date, I download all the network data as a JSON file from Chrome. Now, it’s just a massive, serialized JSON file - not easy to analyze directly.

The Summer2024 history is 55.6MB, which is 2,190,780 words of JSON. That’s a lot of data to process!

To manage these huge files, I turned to a trusty old friend, jq 1 . It’s a command-line JSON processor that makes it easy to extract and transform data. I used it to filter the JSON to include only the data I wanted, then piped it into a new file. This was a huge win, as I was able to work with the data in a more manageable format. This is the jq 1 command I tediously constructed to get the data I needed:

jq '
 .log.entries[]
 | select(.request.url | contains("/data/batchexecute"))
 | .response.content.text
 | @base64d
 | split("\n")[3]
 | fromjson[0][2]
 | fromjson[0]
 | .[]?
 | {
 timestamp:     .[4],
 title:         .[9][0],
 isSearch:      .[9][1],
 url:           .[9][3],
 watchedAt:     .[12]?[0],
 platform:      ([.[19]] | flatten),
 thumbnail:     .[23][0],
 duration:      .[23][1],
 adSource:      .[25]?[0]?[0],
 channelName:   .[32]?[0]?[1],
 channelUrl:    .[32]?[0]?[3]
 }
' -c myactivity.google.com.har | jq -s -c > out.txt

To give you a glimpse as to what the input data looks like, here’s a sample of what the video data looks like:

[
	null,
	null,
	null,
	[26],
	1736129665229291,
	"AODP23YAAAAjUiEIHRCAgJywjt6KAxj_v_me0OCKAzoLCLKBmdz2sqfa7QFhd__uHLO57_1WP_oFLMKL43-ygw",
	"AODP23YAAAATChEIzQEQl9uUJBjrw-v_guCKA835DEJBJPs2MEBn1G2W_lzkMDCh",
	["YouTube", null, "https://www.gstatic.com/images/branding/product/2x/youtube_2024_q4_24dp.png"],
	null,
	[
		"Full video out now! #airsoft #shorts #memes #fyp #fail",
		null,
		"Watched",
		"https://www.youtube.com/watch?v=7bSdl2uGQLI"
	],
	null,
	null,
	null,
	null,
	null,
	null,
	null,
	[""],
	["YouTube", null, "https://www.gstatic.com/images/branding/product/2x/youtube_2024_q4_24dp.png"],
	[["iOS"]],
	null,
	null,
	null,
	["https://i.ytimg.com/vi/7bSdl2uGQLI/mqdefault.jpg", "0:16", 10],
	null,
	null,
	null,
	[[4, "YouTube watch history"]],
	[[26, "YouTube"]],
	null,
	null,
	null,
	[[null, "Mr. Pew", null, "https://www.youtube.com/channel/UC5WOnJ7Z05NM7lbGf2rimig"]]
]

This command turns the raw JSON into a more manageable format, ready for use in the next step. It pulls out key information, such as the video’s title, duration, and the timestamp of when it was watched.

The Summer2024 history after processing is 6.9MB, which is 130,471 words. Much better!

Key Visualizations: Unveiling Viewing Patterns

The heart of the project is the interactive dashboard, built with React 2 and Recharts 3 , which transforms the complex data into a series of easy-to-understand visualizations. Here are some of the key insights it reveals:

Comprehensive Watch Time Dashboard

A holistic view of my YouTube time!

The main dashboard provides a comprehensive overview of my YouTube watch time. See daily watch time, average video duration, daily video counts, and average watch time per day, all at a glance. It’s like a fitness tracker, but for my YouTube consumption!

Screenshot of YouTube Watch History Insights Watch Time ChartScreenshot of YouTube Watch History Insights Watch Time Graph

This was Summer 2024 … YIKES 😬

Time-Based Viewing Pattern Analysis

Next, the dashboard analyzes viewing patterns across days of the week and hours of the day. Here I can discover my peak viewing times for both regular videos and YouTube Shorts.

Screenshot of YouTube Watch History Insights Daily Viewing Chart

Content Consumption Breakdown

The dashboard also provides a visual breakdown of my content consumption, showing watch time for short-form vs. long-form videos, distribution across channels (identifying most watched channels and video counts per channel), and even content type distribution (videos, Shorts, ads).

Screenshot of YouTube Watch History Insights Content Breakdown Charts Screenshot of YouTube Watch History Insights Content Breakdown Charts

Platform Usage Analysis

Lastly, a small bar chart of device usage. I added it because I saw it was in the data, so might as well include it!

Screenshot of YouTube Watch History Insights Platform Usage Chart

Search Term History

At the very bottom of the page, I also included a list of all YouTube terms I searched for during the analyzed period. This provides a text-based insight into what topics and videos I was actively seeking out.

Built with React, Recharts, and a

The YouTube Watch History Insights dashboard is built using React 2 for the frontend and Recharts 3 for creating all the charts and insightful visualizations. And to make the charts as effective and visually appealing as possible, I even leveraged LLMs like Claude to help design the graphs and optimize the Recharts 3 configurations!

Go explore the data here: schmitigal.com/mychronicyoutubeaddiction

Challenges and Learnings:

Turning a massive JSON dump into a user-friendly dashboard was definitely a journey! Here are some key challenges and learnings:

  • It took me a couple of good tries to get working jq command that extracts all the neccessary values from the obfuscated data. And then I forgot to write it down and needed to recreate it again. I gained some more experience with web scraping techniques, and complex data extraction to optimize the data for visualization.

  • Designing a dashboard that effectively communicates complex viewing patterns and insights, required careful consideration of chart types, visual clarity, and interactivity. I really liked looking through the Recharts 3 library documentation to see what is possible and experimenting with LLM assistance to optimize graph configurations and create data-driven visual storytelling. I definitely expanded my knowledge on enhanced data visualization design skills.

Key Contributions: Data Analyst & Visualization Enthusiast

As the solo developer and data analyst for YouTube Watch History Insights, my key contributions were:

  • Conceived, designed, and developed the entire YouTube Watch History Insights website as a personal data exploration project, demonstrating data analysis and visualization skills.
  • Extracted YouTube viewing history data from personal Google accounts using network data viewing and parsing.
  • Developed data processing and parsing pipelines using JQ to transform raw, unstructured data into analyzable datasets.
  • Designed and implemented a comprehensive, interactive dashboard using React and Recharts to visualize a wide range of YouTube viewing statistics and trends.
  • Leveraged LLMs (like Claude) to optimize graph design and Recharts configurations for effective and visually appealing data presentation.

References

Thanks for visiting!

12/21/2025, 5:21:52 PM

Receipt #445620

-------------------------------

References

  1. jq
  2. React ℹ︎ React is a JavaScript library for building user interfaces or UI components. It allows developers to create large web applications that can change data, without reloading the page.
  3. Recharts ℹ︎ Recharts is a composable charting library built on React components. It is designed to be easy to use and customize, allowing developers to create various types of charts and data visualizations.
  4. JQ ℹ︎ jq is a lightweight and flexible command-line JSON processor. It is like `sed` for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that `sed`, `awk`, `grep` and friends let you play with text.
  5. Claude ℹ︎ Claude is a family of large language models created by Anthropic.
-------------------------------

TOTAL: $ 91.53

Amount saved: $5

445620

Come back soon ✌︎

Thank you for visiting :D

Aidan Schmitigal | © 2025