spotify5

Explanation of the service

In pulling track audio and other information from Spotify. This pulls the data in bulk. It allows for a specific artists be selected and see their entire discography. It also pulls for information on both the artists and of your own use as well! This is how you can personally see top hits, amounts listed too, and popular artists that are seen. (This also is similar to the end of the year highlights that Spotify uses aka Spotify wrap)

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.3     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.4.3     ✔ tibble    3.2.1
✔ lubridate 1.9.2     ✔ tidyr     1.3.0
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(spotifyr)

Set up the ID and the client secret

This is specific to your app! As by walking the steps for setting up the API both in R and on the service’s website. So in creating on the app, in this case spotify, find the client ID code and the secret.

The format will look similar to… SPOTIFY_CLIENT_ID “XXXXXXXXX” SPOTIFY_CLIENT_SECRET “XXXXXXXXX”

This can be found on the development for the spotify app. First on the spotify side their must be an 1) The APP Name - Personally did SpotifyAssignment5 for this example 2) App Description - This is so that when looking at next projects able to remember what you did/ what the purpose of the project was for 3) Website - Where user may get more information about this application. 4) Redirect URL- Spotify Developer application needs to have a callback url. You can set this to whatever you want that will work with your application, but a good default option is http://localhost:1410/

How this works in Application

From connection with the personal ID and Secret, able to find data about the artists. Some features can be like get artists audio features. For example like Taylor Swift.

taytay <- get_artist_audio_features('Taylor Swift')

To prove a point, this can be done with other artists such as now you can find the songs that were featured by search of the artists. This is detailed towards the artists.

j.cole <- get_artist_audio_features("J. Cole")
kanye <- get_artist_audio_features("Kayne West")