Profile Picture Martijn Van Vreeden
New Playlist
Number of followers
Calculation of this playlist
This playlist is compiled based on genre filters and multiple characteristics of tracks. I have selected all tracks from artists with a genre that contains "hip hop" or "rap". I have excluded tracks from artists with genres containing "metal". After this, I have created a subset excluding tracks shorter than 80000 milliseconds (interludes and intros).
There are several audio features available in the Spotify API for each individual track. I have based my playlist on the following audio features:
  • Track Tempo
  • Track Liveliness
Based on the new list of tracks, I have selected tracks with the highest tempo (first 150 tracks) and selected tracks with a high level of liveliness based on the new 150 track list. I sorted the list to get the top listened tracks first. The list is made more interesting by ensuring that each artist can only be added to the list once.
R code used to compile the playlist
df5[grepl('hip hop|rap', df5$artist_genres),] -> pl_hiphop
pl_hiphop[!grepl('metal', pl_hiphop$artist_genres),] -> pl_hiphop
subset(pl_hiphop, track_duration_ms > 80000) -> pl_hiphop
head(pl_hiphop %>% arrange(desc(track_tempo)),150) -> hiphop_arr
head(hiphop_arr %>% arrange(desc(track_special_liveliness)),100) -> hiphop_arr2
hiphop_arr2 %>% arrange(desc(count)) -> hiphop_arr3
head(hiphop_arr3[!duplicated(hiphop_arr3$artist_id), ],40)[,1] -> hiphop_tracks1
paste(as.character(hiphop_tracks1$track_id),collapse="|",sep="") -> hiphop_tracks
Lyrics Devices Available