This data science project analyzes global YouTube trending videos to uncover patterns and insights about what makes videos trend on the platform. The analysis explores various aspects, including video categories, channel characteristics, publishing patterns, engagement metrics, and regional trends. Additionally, the project implements machine learning models to predict video view counts, providing content creators with valuable insights for optimizing their videos. The project culminates in an A/B testing framework that can optimize posting strategies.
There are several ways to collect YouTube data, including the official "YouTube Data API v3". However, to get things moving fast, this notebook uses the Kaggle YouTube Trending Videos dataset. This dataset is updated daily on Kaggle and includes:
- Video metadata (ID, title, description, tags, duration, etc.)
- Channel information (title, subscriber count, country, age, etc.)
- Engagement metrics (views, likes, comments)
- Trending information (trending date, trending country)
Dataset size: 3,389,193 records x 28 columns (roughly 6.5GB)
- Data Cleaning & Preprocessing
- Redundant columns
- Missing values
- Datetime conversions
- Feature Engineering
- 13 new columns engineered
- Exploratory Data Analysis (EDA)
- Trends & patterns
- Data visualization
- Predictive Modeling
- Random Forest
- Feature importance
- A/B Testing
- Weekday vs Weekend
- Morning vs Evening
- Engagement performance
- Evening posts may get less reach on average.
- Though fewer views, evening viewers are more engaged (more likes).
- More people are watching on weekends, likely due to free time.
- Weekday audience is more interactive in terms of likes & comments.
- Post videos in the evening (5–9 PM) if your goal is engagement quality (likes/comments per view).
- Morning may be better if reach (total views) is the primary goal.
- Target weekdays (Mon–Fri) for high-engagement posts.
- Optimize Posting Time: Use A/B testing results to schedule posts for maximum engagement (e.g., post in the morning for higher views and likes).
- Competitor Benchmarking: Track performance of competitor channels and replicate successful content strategies.
- Ad Strategy Alignment: Use category popularity trends and engagement metrics to guide ad placement or influencer partnerships.






