End-to-end EDA on 20,718 tracks combining Spotify audio features & YouTube engagement metrics | Analyzing top artists, streams, danceability & cross-platform correlations using Python, Pandas & Seaborn
An end-to-end Data Analysis project on 20,718 tracks combining Spotify audio features and YouTube engagement metrics, completed as part of the Python for Data Analysis course.
Analyze top artists by YouTube views, top tracks by Spotify streams, album type distributions, engagement quality ratios, danceability patterns, and cross-platform correlations.
- Source: SpotifyYoutubeData.csv
- Records: 20,718 tracks
- Spotify Features: Danceability, Energy, Key, Loudness, Speechiness, Acousticness, Instrumentalness, Liveness, Valence, Tempo, Duration, Stream
- YouTube Metrics: Views, Likes, Comments, Channel, Licensed, official_video
| Library | Purpose |
|---|---|
| Pandas | Data cleaning, groupby, aggregation, ratios |
| Matplotlib | Bar charts, scatter plots |
| Seaborn | Heatmaps, boxplots, pairplots, histograms |
Group by Artist, sum Views, sort descending.
Sort by Stream column, show top 10.
Use value_counts() on Album_type — visualized with pie and bar charts.
Use groupby('Album_type').agg() for multi-metric comparison.
Group by Channel, sum Views, take top 5.
Use idxmax() to identify the record-holder.
Engineer Like_to_View_Ratio = Likes / Views to measure engagement quality vs raw popularity.
Group by Album, average Danceability score, sort descending.
Heatmap + pairplot of all 4 engagement metrics.
- Imports & Setup
- Load Dataset
- First Look (head / tail)
- Data Structure & Info
- Missing Values Heatmap
- Duplicate Check
- Analytical Questions (Q1 → Q9)
- Additional Visualizations
- Audio Features Distribution
- Audio Features by Album Type
- YouTube Views vs Spotify Streams
- Key Insights
- Despacito dominates YouTube with 8B+ views
- Blinding Lights leads Spotify with 3.4B streams
- Singles make up ~74% of all tracks
- Like-to-View ratio reveals engagement quality beyond raw views
- YouTube metrics (Views/Likes/Comments) correlate strongly with each other but weakly with Spotify Streams
- Singles score higher in Danceability than album tracks on average
git clone https://github.com/ammarelsayed-2a/Project-12-Python-For-Data-Analysis-Spotify-YouTube.git
cd Project-12-Python-For-Data-Analysis-Spotify-YouTube
jupyter notebook "Project 12 SpotifyYoutube.ipynb"Ammar Elsayed — Python for Data Analysis | 2026
LinkedIn