Skip to content

Instantly share code, notes, and snippets.

@JosiahParry
Created September 9, 2019 14:51
Show Gist options
  • Save JosiahParry/610427731304b00317caab25faf4d321 to your computer and use it in GitHub Desktop.
Save JosiahParry/610427731304b00317caab25faf4d321 to your computer and use it in GitHub Desktop.
track_audio_features <- possibly(.f = {
function(artist, title, type = "track") {
search_results <- search_spotify(paste(artist, title), type = type)
track_audio_feats <- get_track_audio_features(search_results$id[[1]]) %>%
dplyr::select(-id, -uri, -track_href, -analysis_url)
return(track_audio_feats)
}}, otherwise = tibble())
@JosiahParry
Copy link
Author

Hey @drew-walkerr, so sorry for not getting back to you on this! I hope this has gone well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment