🎯 Introduction

This project analyzes the most streamed Spotify songs in 2024.

We explore: - Top artists and songs
- Temporal streaming trends
- Impact of collaborations

Dataset Source: Spotify (2024)
File: Most Streamed Spotify Songs 2024.csv

📥 Load and Clean Data

spotify <- read_csv("/Users/gayathrikota/Desktop/DAT 301 Project/Most Streamed Spotify Songs 2024.csv", 
                    locale = locale(encoding = "latin1"))
cols_to_clean <- c(
  'Spotify Streams', 'Spotify Playlist Count', 'Spotify Playlist Reach',
  'YouTube Views', 'YouTube Likes', 'TikTok Posts', 'TikTok Likes',
  'TikTok Views', 'YouTube Playlist Reach', 'AirPlay Spins', 'SiriusXM Spins',
  'Deezer Playlist Reach', 'Pandora Streams', 'Pandora Track Stations',
  'Soundcloud Streams', 'Shazam Counts'
)
char_cols <- spotify %>%
  select(all_of(cols_to_clean)) %>%
  select(where(is.character)) %>%
  colnames()
spotify <- spotify %>%
  mutate(across(all_of(char_cols), ~parse_number(.x))) %>%
  mutate(`Release Date` = mdy(`Release Date`))

🎵 Code: Top 10 Most Streamed Songs

  top_songs <- spotify %>%
  arrange(desc(`Spotify Streams`)) %>%
  slice_head(n = 10)

🎵 Chart: Top 10 Most Streamed Songs

👩‍🎤 Code: Top 10 Most Streamed Artists

  top_artists <- spotify %>%
  group_by(Artist) %>%
  summarise(Total_Streams = sum(`Spotify Streams`, na.rm = TRUE)) %>%
  arrange(desc(Total_Streams)) %>%
  slice_head(n = 10)

👩‍🎤 Chart: Top 10 Most Streamed Artists

Code: Streams by Month

  monthly_streams <- spotify %>%
  mutate(Month = floor_date(`Release Date`, "month")) %>%
  group_by(Month) %>%
  summarise(Total_Streams = sum(`Spotify Streams`, na.rm = TRUE))

Chart: Streams by Month

Code: Collabs vs Non-Collabs

collab_keywords <- c("feat", "ft", "&")
spotify <- spotify %>%
  mutate(Collaboration = str_detect(tolower(Track), paste(collab_keywords, collapse = "|")))

collab_stats <- spotify %>%
  group_by(Collaboration) %>%
  summarise(Average_Streams = mean(`Spotify Streams`, na.rm = TRUE))

Chart: Collabs vs Non-Collabs

📌 Conclusion

  • Top songs include MILLION DOLLAR BABY, and top artists like Taylor Swift, Kendrick Lamar
  • Streaming was highest between March–May
  • Collaborations received more streams than solo songs
  • I practiced real data cleaning and visualization using R

This project gave me insights into music trends using data science!