add_audio_analysis.Rd
Fetches and joins the Spotify audio analysis for every Spotify URI in a data frame.
add_audio_analysis(df, ...)
A data frame with a track_uri
column.
Parameters passed on to get_tidy_audio_analysis
.
library(tidyverse)
#> ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
#> ✔ ggplot2 3.4.1 ✔ purrr 1.0.1
#> ✔ tibble 3.1.8 ✔ dplyr 1.1.0
#> ✔ tidyr 1.3.0 ✔ stringr 1.5.0
#> ✔ readr 2.1.4 ✔ forcats 1.0.0
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag() masks stats::lag()
spotifyr::get_playlist_audio_features("", "37i9dQZF1DX21bRPJuEN7r") %>%
slice(1:5) %>%
add_audio_analysis()
#> Request failed [404]. Retrying in 1 seconds...
#> Request failed [404]. Retrying in 1.4 seconds...
#> Error in map(.x, .f, ...): ℹ In index: 1.
#> Caused by error in `query_playlist()`:
#> ! Not Found (HTTP 404).