Skip to content

ammarelsayed-2a/Project-12-Python-For-Data-Analysis-Spotify-YouTube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Project-12-Python-For-Data-Analysis-Spotify-YouTube

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

🎵 Data Analysis Project — Spotify & YouTube Dataset

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.

📌 Objective

Analyze top artists by YouTube views, top tracks by Spotify streams, album type distributions, engagement quality ratios, danceability patterns, and cross-platform correlations.

📂 Dataset

  • 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

🛠️ Tools & Libraries

Library Purpose
Pandas Data cleaning, groupby, aggregation, ratios
Matplotlib Bar charts, scatter plots
Seaborn Heatmaps, boxplots, pairplots, histograms

❓ Analytical Questions

Q1 — Top 10 Artists with Highest YouTube Views

Group by Artist, sum Views, sort descending.

Q2 — Top 10 Tracks with Highest Spotify Streams

Sort by Stream column, show top 10.

Q3 — Most Common Album Types & Track Count per Type

Use value_counts() on Album_type — visualized with pie and bar charts.

Q4 — Average Views, Likes & Comments by Album Type

Use groupby('Album_type').agg() for multi-metric comparison.

Q5 — Top 5 YouTube Channels by Views

Group by Channel, sum Views, take top 5.

Q6 — The Single Most-Viewed Track on YouTube

Use idxmax() to identify the record-holder.

Q7 — Top 7 Tracks with Highest Like-to-View Ratio

Engineer Like_to_View_Ratio = Likes / Views to measure engagement quality vs raw popularity.

Q8 — Top Albums with Maximum Danceability

Group by Album, average Danceability score, sort descending.

Q9 — Correlation between Views, Likes, Comments & Stream

Heatmap + pairplot of all 4 engagement metrics.

📊 Analysis Structure

  1. Imports & Setup
  2. Load Dataset
  3. First Look (head / tail)
  4. Data Structure & Info
  5. Missing Values Heatmap
  6. Duplicate Check
  7. Analytical Questions (Q1 → Q9)
  8. Additional Visualizations
    • Audio Features Distribution
    • Audio Features by Album Type
    • YouTube Views vs Spotify Streams
  9. Key Insights

💡 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

🚀 How to Run

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"

👤 Author

Ammar Elsayed — Python for Data Analysis | 2026
LinkedIn

About

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

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors