The data reveals exactly when, where, and how viral content is made
By Gencay
Published: 2025-12-19
URL: https://www.learnwithmeai.com/p/data-project-16-i-analyzed-48000

Everyone’s guessing what makes content go viral. I stopped guessing.
I analyzed 48,000+ videos from TikTok and YouTube Shorts (Jan-Aug 2025 data) across 15 genres and 60 countries. Then I built an AI-powered dashboard that tells you exactly what to post, when to post, and which hashtags to use.
- Do you know that posting at the wrong hour can cost you 47% of your engagement?
- Do you know that TikTok outperforms YouTube Shorts in some genres by 38%, but loses in others?
- Do you know that the top 1% of content creators use videos that are 23 seconds shorter than average?
I didn’t know either. But the data told me everything.
Any feedback? Fill out this form, and each month, I’ll send a free subscription to those who contribute the most.
What do I build?
This isn’t just another data analysis. I built a complete Content Advisor dashboard with:
Viral Score Predictor: Input your video details, get a viral probability score before you post
Golden Hours Finder: Heatmap showing exactly when to post for maximum engagement
Content DNA Analyzer: What separates the top 1% from everyone else
Competition Radar: Find low-competition, high-reward niches
AI Advisor: Claude-powered personalized recommendations
The dashboard is live. The code is available. And here’s the kicker. I built the entire 1,186-line dashboard using Claude Code with a single prompt.
LearnAIWithMe Paid Perks
The standard subscription ($12/mo or $100/year) gives you full access to all my articles and posts on Substack
The Founding Member tier ($200/year) includes everything above PLUS access to The Vault, 700+ prompts, projects, AI tools, and AI labs.
Now, let’s look at the prompt to build this Streamlit app without coding!
The Prompt To build This App (Copy & Paste)
Here’s what most people don’t realize: I didn’t write 1,186 lines of code manually.
I used Claude Code with a single prompt. Here it is:
Build a Streamlit dashboard for TikTok and YouTube Shorts content analysis using these CSV files:
- youtube_shorts_tiktok_trends_2025.csv (main data)
- top_hashtags_2025.csv
- monthly_trends_2025.csv
- top_creators_impact_2025.csv
- country_platform_summary_2025.csv
Create these features:
1. Overview tab with platform comparison, genre ranking, monthly trends
2. Viral Score Predictor - input video details, output viral probability (0-100)
3. Golden Hours heatmap - engagement by hour × day, filterable by genre/platform
4. Content DNA Analyzer - compare top 1% vs average content characteristics
5. Competition Radar - scatter plot showing opportunity score by genre
6. AI Advisor tab with Claude API integration for personalized recommendations
Use Plotly for visualizations. Add custom CSS for professional styling.
Calculate genre-specific insights: best hashtags, optimal duration, best posting times.
Make it production-ready with caching and error handling.
Claude Code generated the entire app.py file. I made minor tweaks for styling. That’s it, but first, let’s see how to start Claude Code.
How to start Claude Code?
It is really easy, and you won’t use too much code to do that, trust me.
Just open your terminal and type this
claude
Next, it wants you to log in with your Claude account. Once you do, you are ready!
If you have trouble, read this official document.
Hint: I suggest you download Visual Studio Code, and next download the Claude Code Extension.

Now, you’ll have an interface. This feels more like vibe-coding.

After downloading the Claude code, create a new folder named Content Advisor. Put the datasets you downloaded from this Kaggle.
And when you start working with Claude Code, paste the path of this file and send it to Claude Code with the prompt I gave to you, and that’s it!
Next, deploy your streamlit app, so you can share it with your friends too!
How to deploy your streamlit app?
What you need to do next is pretty simple.
- Upload the file Claude Code generated to GitHub by creating a repository.
- Add Secrets
- In Streamlit Cloud, go to Settings → Secrets, Add your
ANTHROPIC\API\KEYfor AI Advisor feature - If you don’t have an anthropic api, get yours here.
The files you need:
- app.py - Full Streamlit dashboard (1,186 lines)
- CSV files - Download from Kaggle dataset
- requirements.txt - streamlit, pandas, plotly, anthropic

Here are the files that I uploaded to the gDrive, if you don’t want to create from scratch, including app.py.
Hint: If you struggle, just paste the information from this article into any AI, and it will give you steps. Just follow them, trust me, you’ll build this app.
Now, let me share with you the details of my analysis.
Question 1: Which Platform Wins?
Short answer: It depends entirely on your genre.
The global averages are misleading. Yes, TikTok has higher overall engagement. But when I broke it down by genre, the results surprised me:
TikTok dominates in:
- Dance (+38% vs YouTube)
- Comedy (+29%)
- Music (+24%)
YouTube Shorts wins in:
- Education (+31% vs TikTok)
- Tech (+27%)
- DIY (+19%)
Here’s what this means: If you’re making dance content and posting to YouTube Shorts first, you’re leaving 38% of your potential engagement on the table. Platform selection isn’t a preference; it’s a strategy.
Key Finding: Platform advantage varies by genre from -31% to +38%. Choosing wrong costs you up to a third of your reach.
Question 2: When Should You Post?
Short answer: There’s a 47% engagement gap between the best and worst posting times.
I built a heatmap showing engagement rates by hour and day for each genre.
The patterns are not what you’d expect:
Golden Windows (Global):
- Tuesday at 7 PM - highest overall engagement
- Thursday at 8 PM - second best
- Sunday at 11 AM - weekend peak
Dead Zones:
- Monday 6-9 AM (people hate Mondays)
- Friday after 10 PM (people are out)
- Wednesday 2-4 PM (afternoon slump)
But here’s the insight most creators miss: genre matters more than general rules.
Gaming content peaks at 9 PM. Education content peaks at 10 AM. Fitness content peaks at 6 AM (gym crowd).
The dashboard lets you filter by genre and see your specific golden hours. Using the wrong “best time to post” advice for your niche could cost you half your engagement.
Key Finding: Timing optimization alone can increase engagement by 47%. Generic advice hurts more than it helps.
Question 3: What Makes Top 1% Content Different?
Short answer: They’re shorter, faster, and use different hashtags than everyone else.
I isolated the top 1% of performers (engagement rate > 99th percentile) and compared them to average content:
| Metric | Top 1% | Average | Difference |
|--------|--------|---------|------------|
| Duration | 34s | 57s | -40% shorter |
| Completion Rate | 78% | 52% | +50% higher |
| Velocity (24h) | 12,400/day | 1,800/day | +588% faster |
The top 1% get 6x more engagement in the first 24 hours. Their videos are 40% shorter. And their completion rates are 50% higher.
Why? The algorithm rewards completion. A 34-second video that 78% of viewers finish beats a 57-second video that only 52% complete. The algorithm interprets completion as quality.
Key Finding: Shorter videos with higher completion rates beat longer videos every time. The top 1% optimize for finished views, not watch time.
Question 4: Which Hashtags Actually Work?
Short answer: Genre-specific hashtags outperform generic ones by 3x.
I analyzed hashtag performance across all videos. The findings:
Worst performing:
- #fyp (everyone uses it, no signal)
- #viral (ironic)
- #trending (overused)
Best performing:
- Genre-specific tags (#foodtiktok, #pettok, #techtips)
- Niche tags with 100K-1M uses (not too big, not too small)
- Trending sounds paired with relevant tags
The top 1% use an average of 4.2 hashtags per video. Average creators use 8.7. More isn’t better; precision is.
Key Finding: Using 4 targeted hashtags beats 9 generic ones. #fyp is basically useless.
Question 5: Where Are the Untapped Opportunities?

Short answer: I built a Competition Radar to find them.
I created an “Opportunity Score” for each genre:
Opportunity Score = (Average Engagement) / (Competition Level) × (Rising Content %)
Top 3 Opportunities (High engagement, low competition):
- Pets - 2.3x opportunity score (everyone loves pets, not saturated)
- DIY - 1.9x opportunity score (practical value, loyal audience)
- Education - 1.7x opportunity score (YouTube Shorts growing fast here)
Avoid (Low engagement, high competition):
- Dance - 0.4x opportunity score (saturated, hard to stand out)
- Music - 0.5x opportunity score (copyright issues, algorithmic suppression)
The dashboard visualizes this as a scatter plot. Upper-left quadrant = gold mine. Lower-right = avoid.
Key Finding: Pet content has a 5.75x better opportunity score than dance content. Niche selection matters more than skill.
The Viral Score Predictor
This is the feature I’m most proud of.
Input your video details:
- Genre
- Platform
- Duration
- Upload time
- Day of week
- Whether you’re using trending sounds
- Whether you have a strong hook
- Whether you have a CTA
The predictor outputs:
- Viral Score (0-100) with confidence level
- Predicted engagement rate vs genre average
- Predicted views vs genre average
- Factor breakdown - what’s helping, what’s hurting
A score above 75 = high viral potential. Below 50 = needs optimization.
I tested it against the holdout dataset. Videos scoring 75+ achieved 3.2x higher engagement than those scoring below 50. The predictor works.
The AI Advisor
For those who want personalized recommendations, I integrated the Claude API.
Describe your content idea in natural language:
I want to make cooking videos showing quick 5-minute recipes.
The AI analyzes:
- Maps your idea to the best-fit genre(s)
- Pulls relevant data insights
- Generates 3 catchy video titles
- Writes a hook script for the first 3 seconds
- Suggests a trending angle or collaboration idea
All recommendations are grounded in the 48,000-video dataset. No generic advice, just data-backed strategy.
How to Use the Dashboard?
The Streamlit dashboard has 6 tabs:
- Overview - Global stats, platform comparison, genre ranking
- Viral Predictor - Input your video details, get a score
- Golden Hours - Interactive heatmap for timing optimization
- Content DNA - Top 1% vs average analysis by genre
- Competition Radar - Opportunity matrix for niche selection
- AI Advisor - Claude-powered personalized recommendations
Each tab is designed to answer one strategic question. Together, they form a complete content strategy system.
Final Thoughts
Content creation used to be pure intuition.
Post what feels right, hope it works.
That era is ending. With 48,000+ videos of data, we now know exactly what works. The gap between data-driven creators and intuition-driven creators will only widen. This dashboard is my attempt to put the data in your hands.
Use it.
Thanks for reading! If you found this useful, let me know what other content analysis you’d like to see.