Loading repository data…
Loading repository data…
gpsyrou / repository
The YouTube Virality project collects and analyzes trending video data from multiple countries using the YouTube API. It aims to gather metrics like view counts, likes, and descriptions, then apply data science techniques to predict a video's likelihood of going viral.
The Tube Virality project aims to collect, analyze, and model YouTube trending video data across multiple countries using the YouTube API. It aims to gather metrics like view counts, likes, and descriptions, then apply data science techniques to predict a video's likelihood of going viral.
The data is automatically collected using the YouTube API and stored in this GitHub location:
🔗 Trending Video Metadata
Fetching Trending Videos
Daily Statistics Updates (Automated via GitHub Actions)
graph TD;
A[trending.py: Fetch Trending Videos] -->|Generates daily JSON files - one per country| B[trending_db.py: Aggregate Trending Data];
B -->|Merges all country JSONs into a unified CSV| C[video_stats.py: Extract & Fetch Video Stats];
C -->|Creates a daily JSON file with statistics for all videos| D[video_stats_db.py: Compile Video Stats History];
D -->|Combines all daily stats JSONs into a final dataset| E[Complete Merged Video Stats JSON];
Virality isn't simply measured by raw view count. Our analysis considers multiple factors, for example:
Our models will classify videos as "success" (viral) or "non-success", based on the metrics retrieved, but the success/non-success will be up to us to decide.
| Metric | Description | Importance |
|---|---|---|
| Engagement Rate | Likes, comments, and shares relative to views | High |
| Growth Velocity | How quickly a video gains views in the first hours/days | Critical |
| Audience Reach | Views relative to channel subscriber count | High |
| Subscriber Growth | New subscribers gained after video publication | Medium |
| Trending Duration | How long a video remains on trending lists | Medium |
Our dataset includes key video metadata and engagement statistics, such as:
📌 Goal: Use these features to identify patterns and train models for virality prediction.
1️⃣ Data Collection – Retrieve daily trending videos across countries.
2️⃣ Data Cleaning & Preprocessing – Handle missing values, outliers, and standardize data.
3️⃣ Exploratory Analysis – Identify key trends and patterns.
4️⃣ Feature Engineering – Extract additional insights like growth rate and engagement score.
5️⃣ Model Development – Train ML models for virality prediction.
6️⃣ Evaluation & Interpretation – Validate predictions and refine models.
We've harnessed a blend of cutting-edge technologies to power the Tube Virality project:
🔹 Python 3.9 – Data processing, analysis, and ML model training. (currently)
🔹 SQL – Storing structured video metadata for analysis. (future iteration)