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
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
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`))
top_songs <- spotify %>% arrange(desc(`Spotify Streams`)) %>% slice_head(n = 10)
top_artists <- spotify %>% group_by(Artist) %>% summarise(Total_Streams = sum(`Spotify Streams`, na.rm = TRUE)) %>% arrange(desc(Total_Streams)) %>% slice_head(n = 10)
monthly_streams <- spotify %>% mutate(Month = floor_date(`Release Date`, "month")) %>% group_by(Month) %>% summarise(Total_Streams = sum(`Spotify Streams`, na.rm = TRUE))
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))
This project gave me insights into music trends using data science!