PART 1

Introduction

For this assignment, I have decided to use the Spotify API. Throughout college and even the majority of my life, music has been an escape from reality for me. Listening to music helps me get through studying, get through the gym, and even sleep. Music has been apart of my life for as long as I can remember.

Using the Spotify API, I want to look at what I listen to and the variability of genre or feeling one receives from a particular type of music. I will be using my girlfriends Spotify since I do not have one, so if there are weird songs, blame her… One example would be, do I listen to more upbeat music? Is this upbeat music found more so in rock and roll music or rap music? I want to dive into details like this to help and explain when and why I listen to the music I do.

Data Dictionary

VARIABLE DESCRIPTION
artist_name name of artist
artist_id artist’s identification number
album_id album’s identification number
album_type album v single
album_images pictures associated with album
album_release_date date album was released
album_release_year year album was released
album_release_date_precision day
dancability how danceable the song is rated
energy how much energy the song is rated with
key the key of the song
loudness how loud the song is
mode mode of the song
speechiness how wordy v musical a song is
acousticness how accoustic a song is
instrumentalness how instrumental a song is
liveness how lively a song is
valence how attractive a song is to hear
tempo the tempo of the song
track_id id number for a track
analysis_url url to the song or album
time_signature what time sig the song is in
artists what artists worked on the song
available_markets markets song is available in
disc_number disc number song is on album
duration_ms duration in ms
explicit whether song is explicit or not
track_href url to href
is_local whether song is local or not
track_name name of track
track_preview_url url to track preview
track_number number the track is
type track or not
track_uri spotify track uri indicator
external_urls.spotify external spotify urls
album_name name of album
key_name what key track is in
mode_name what mode track is in
key_mode specific mode of track

Summary Statistics

Doja Cat

##  artist_name         artist_id           album_id          album_type       
##  Length:163         Length:163         Length:163         Length:163        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  album_images       album_release_date   album_release_year
##  Length:163         Min.   :2018-03-30   Min.   :2018      
##  Class :character   1st Qu.:2019-02-28   1st Qu.:2019      
##  Mode  :character   Median :2019-11-07   Median :2019      
##                     Mean   :2020-03-15   Mean   :2020      
##                     3rd Qu.:2021-06-25   3rd Qu.:2021      
##                     Max.   :2021-06-27   Max.   :2021      
##  album_release_date_precision  danceability        energy      
##  Length:163                   Min.   :0.4790   Min.   :0.4070  
##  Class :character             1st Qu.:0.6835   1st Qu.:0.5350  
##  Mode  :character             Median :0.7330   Median :0.6520  
##                               Mean   :0.7376   Mean   :0.6379  
##                               3rd Qu.:0.8045   3rd Qu.:0.7125  
##                               Max.   :0.9270   Max.   :0.8750  
##       key            loudness            mode         speechiness     
##  Min.   : 0.000   Min.   :-10.941   Min.   :0.0000   Min.   :0.02540  
##  1st Qu.: 2.000   1st Qu.: -6.564   1st Qu.:0.0000   1st Qu.:0.04925  
##  Median : 6.000   Median : -5.834   Median :1.0000   Median :0.08240  
##  Mean   : 5.399   Mean   : -5.737   Mean   :0.6933   Mean   :0.10049  
##  3rd Qu.: 8.000   3rd Qu.: -5.235   3rd Qu.:1.0000   3rd Qu.:0.15400  
##  Max.   :11.000   Max.   : -2.474   Max.   :1.0000   Max.   :0.38300  
##   acousticness     instrumentalness       liveness         valence      
##  Min.   :0.00128   Min.   :0.0000000   Min.   :0.0643   Min.   :0.1250  
##  1st Qu.:0.05725   1st Qu.:0.0000000   1st Qu.:0.0926   1st Qu.:0.2870  
##  Median :0.21000   Median :0.0000148   Median :0.1170   Median :0.4840  
##  Mean   :0.20445   Mean   :0.0026053   Mean   :0.1478   Mean   :0.4784  
##  3rd Qu.:0.29650   3rd Qu.:0.0009280   3rd Qu.:0.1540   3rd Qu.:0.6520  
##  Max.   :0.59700   Max.   :0.0454000   Max.   :0.4830   Max.   :0.9070  
##      tempo          track_id         analysis_url       time_signature 
##  Min.   : 74.98   Length:163         Length:163         Min.   :4.000  
##  1st Qu.:108.00   Class :character   Class :character   1st Qu.:4.000  
##  Median :128.00   Mode  :character   Mode  :character   Median :4.000  
##  Mean   :126.43                                         Mean   :4.012  
##  3rd Qu.:141.55                                         3rd Qu.:4.000  
##  Max.   :199.72                                         Max.   :5.000  
##    artists          available_markets   disc_number  duration_ms    
##  Length:163         Length:163         Min.   :1    Min.   :138293  
##  Class :character   Class :character   1st Qu.:1    1st Qu.:179360  
##  Mode  :character   Mode  :character   Median :1    Median :199440  
##                                        Mean   :1    Mean   :200157  
##                                        3rd Qu.:1    3rd Qu.:217813  
##                                        Max.   :1    Max.   :286516  
##   explicit        track_href         is_local        track_name       
##  Mode :logical   Length:163         Mode :logical   Length:163        
##  FALSE:73        Class :character   FALSE:163       Class :character  
##  TRUE :90        Mode  :character                   Mode  :character  
##                                                                       
##                                                                       
##                                                                       
##  track_preview_url   track_number        type            track_uri        
##  Length:163         Min.   : 1.000   Length:163         Length:163        
##  Class :character   1st Qu.: 4.000   Class :character   Class :character  
##  Mode  :character   Median : 8.000   Mode  :character   Mode  :character  
##                     Mean   : 8.098                                        
##                     3rd Qu.:12.000                                        
##                     Max.   :19.000                                        
##  external_urls.spotify  album_name          key_name          mode_name        
##  Length:163            Length:163         Length:163         Length:163        
##  Class :character      Class :character   Class :character   Class :character  
##  Mode  :character      Mode  :character   Mode  :character   Mode  :character  
##                                                                                
##                                                                                
##                                                                                
##    key_mode        
##  Length:163        
##  Class :character  
##  Mode  :character  
##                    
##                    
## 

Fall Out Boy

##  artist_name         artist_id           album_id          album_type       
##  Length:337         Length:337         Length:337         Length:337        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  album_images       album_release_date   album_release_year
##  Length:337         Min.   :2003-03-25   Min.   :2003      
##  Class :character   1st Qu.:2007-02-06   1st Qu.:2007      
##  Mode  :character   Median :2008-01-01   Median :2008      
##                     Mean   :2010-08-22   Mean   :2010      
##                     3rd Qu.:2015-01-20   3rd Qu.:2015      
##                     Max.   :2019-11-15   Max.   :2019      
##  album_release_date_precision  danceability        energy      
##  Length:337                   Min.   :0.1440   Min.   :0.2300  
##  Class :character             1st Qu.:0.4450   1st Qu.:0.8420  
##  Mode  :character             Median :0.5230   Median :0.9070  
##                               Mean   :0.5195   Mean   :0.8679  
##                               3rd Qu.:0.5980   3rd Qu.:0.9490  
##                               Max.   :0.7600   Max.   :0.9930  
##       key            loudness            mode         speechiness     
##  Min.   : 0.000   Min.   :-19.247   Min.   :0.0000   Min.   :0.02750  
##  1st Qu.: 2.000   1st Qu.: -4.986   1st Qu.:0.0000   1st Qu.:0.04970  
##  Median : 6.000   Median : -3.926   Median :1.0000   Median :0.06510  
##  Mean   : 5.608   Mean   : -4.768   Mean   :0.5964   Mean   :0.09635  
##  3rd Qu.: 9.000   3rd Qu.: -3.485   3rd Qu.:1.0000   3rd Qu.:0.09980  
##  Max.   :11.000   Max.   : -1.697   Max.   :1.0000   Max.   :0.55900  
##   acousticness       instrumentalness      liveness         valence      
##  Min.   :0.0000271   Min.   :0.00e+00   Min.   :0.0170   Min.   :0.0609  
##  1st Qu.:0.0013300   1st Qu.:0.00e+00   1st Qu.:0.1740   1st Qu.:0.3790  
##  Median :0.0052000   Median :3.50e-06   Median :0.3080   Median :0.5090  
##  Mean   :0.0476486   Mean   :8.02e-03   Mean   :0.3616   Mean   :0.5101  
##  3rd Qu.:0.0196000   3rd Qu.:8.64e-05   3rd Qu.:0.4960   3rd Qu.:0.6470  
##  Max.   :0.8350000   Max.   :5.95e-01   Max.   :0.9780   Max.   :0.9610  
##      tempo          track_id         analysis_url       time_signature 
##  Min.   : 47.26   Length:337         Length:337         Min.   :3.000  
##  1st Qu.:109.51   Class :character   Class :character   1st Qu.:4.000  
##  Median :135.16   Mode  :character   Mode  :character   Median :4.000  
##  Mean   :135.29                                         Mean   :3.976  
##  3rd Qu.:156.04                                         3rd Qu.:4.000  
##  Max.   :199.94                                         Max.   :5.000  
##    artists          available_markets   disc_number     duration_ms    
##  Length:337         Length:337         Min.   :1.000   Min.   : 48746  
##  Class :character   Class :character   1st Qu.:1.000   1st Qu.:193026  
##  Mode  :character   Mode  :character   Median :1.000   Median :211026  
##                                        Mean   :1.015   Mean   :210037  
##                                        3rd Qu.:1.000   3rd Qu.:229093  
##                                        Max.   :2.000   Max.   :304466  
##   explicit        track_href         is_local        track_name       
##  Mode :logical   Length:337         Mode :logical   Length:337        
##  FALSE:322       Class :character   FALSE:337       Class :character  
##  TRUE :15        Mode  :character                   Mode  :character  
##                                                                       
##                                                                       
##                                                                       
##  track_preview_url   track_number        type            track_uri        
##  Length:337         Min.   : 1.000   Length:337         Length:337        
##  Class :character   1st Qu.: 4.000   Class :character   Class :character  
##  Mode  :character   Median : 7.000   Mode  :character   Mode  :character  
##                     Mean   : 6.807                                        
##                     3rd Qu.:10.000                                        
##                     Max.   :18.000                                        
##  external_urls.spotify  album_name          key_name          mode_name        
##  Length:337            Length:337         Length:337         Length:337        
##  Class :character      Class :character   Class :character   Class :character  
##  Mode  :character      Mode  :character   Mode  :character   Mode  :character  
##                                                                                
##                                                                                
##                                                                                
##    key_mode        
##  Length:337        
##  Class :character  
##  Mode  :character  
##                    
##                    
## 

Pierce The Veil

##  artist_name         artist_id           album_id          album_type       
##  Length:97          Length:97          Length:97          Length:97         
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  album_images       album_release_date album_release_year
##  Length:97          Length:97          Min.   :2007      
##  Class :character   Class :character   1st Qu.:2010      
##  Mode  :character   Mode  :character   Median :2012      
##                                        Mean   :2011      
##                                        3rd Qu.:2012      
##                                        Max.   :2016      
##  album_release_date_precision  danceability        energy      
##  Length:97                    Min.   :0.1600   Min.   :0.1900  
##  Class :character             1st Qu.:0.3660   1st Qu.:0.8880  
##  Mode  :character             Median :0.4400   Median :0.9460  
##                               Mean   :0.4273   Mean   :0.8876  
##                               3rd Qu.:0.5050   3rd Qu.:0.9750  
##                               Max.   :0.6870   Max.   :0.9890  
##       key            loudness            mode         speechiness     
##  Min.   : 0.000   Min.   :-13.465   Min.   :0.0000   Min.   :0.02330  
##  1st Qu.: 2.000   1st Qu.: -4.902   1st Qu.:0.0000   1st Qu.:0.04990  
##  Median : 4.000   Median : -3.782   Median :0.0000   Median :0.07990  
##  Mean   : 4.505   Mean   : -4.379   Mean   :0.3814   Mean   :0.08533  
##  3rd Qu.: 6.000   3rd Qu.: -2.993   3rd Qu.:1.0000   3rd Qu.:0.11600  
##  Max.   :11.000   Max.   : -1.992   Max.   :1.0000   Max.   :0.23400  
##   acousticness       instrumentalness       liveness         valence      
##  Min.   :0.0000261   Min.   :0.0000000   Min.   :0.0354   Min.   :0.0561  
##  1st Qu.:0.0001580   1st Qu.:0.0000000   1st Qu.:0.1030   1st Qu.:0.2510  
##  Median :0.0005850   Median :0.0000053   Median :0.2350   Median :0.3380  
##  Mean   :0.0340302   Mean   :0.0254811   Mean   :0.2414   Mean   :0.3399  
##  3rd Qu.:0.0029000   3rd Qu.:0.0001500   3rd Qu.:0.3550   3rd Qu.:0.4180  
##  Max.   :0.6940000   Max.   :0.7950000   Max.   :0.6490   Max.   :0.7810  
##      tempo          track_id         analysis_url       time_signature 
##  Min.   : 73.02   Length:97          Length:97          Min.   :3.000  
##  1st Qu.:105.04   Class :character   Class :character   1st Qu.:4.000  
##  Median :127.01   Mode  :character   Mode  :character   Median :4.000  
##  Mean   :130.10                                         Mean   :3.887  
##  3rd Qu.:156.06                                         3rd Qu.:4.000  
##  Max.   :196.06                                         Max.   :4.000  
##    artists          available_markets   disc_number  duration_ms    
##  Length:97          Length:97          Min.   :1    Min.   : 64720  
##  Class :character   Class :character   1st Qu.:1    1st Qu.:212552  
##  Mode  :character   Mode  :character   Median :1    Median :236293  
##                                        Mean   :1    Mean   :232768  
##                                        3rd Qu.:1    3rd Qu.:265752  
##                                        Max.   :1    Max.   :357403  
##   explicit        track_href         is_local        track_name       
##  Mode :logical   Length:97          Mode :logical   Length:97         
##  FALSE:87        Class :character   FALSE:97        Class :character  
##  TRUE :10        Mode  :character                   Mode  :character  
##                                                                       
##                                                                       
##                                                                       
##  track_preview_url   track_number        type            track_uri        
##  Length:97          Min.   : 1.000   Length:97          Length:97         
##  Class :character   1st Qu.: 4.000   Class :character   Class :character  
##  Mode  :character   Median : 7.000   Mode  :character   Mode  :character  
##                     Mean   : 6.598                                        
##                     3rd Qu.:10.000                                        
##                     Max.   :14.000                                        
##  external_urls.spotify  album_name          key_name          mode_name        
##  Length:97             Length:97          Length:97          Length:97         
##  Class :character      Class :character   Class :character   Class :character  
##  Mode  :character      Mode  :character   Mode  :character   Mode  :character  
##                                                                                
##                                                                                
##                                                                                
##    key_mode        
##  Length:97         
##  Class :character  
##  Mode  :character  
##                    
##                    
## 

PART 2

What are my Recent Listens?

track.name artist.name track.album.name played_at
Rich Flex Drake Her Loss 2022-12-09 15:58:26
In the Zone Ken Ashcorp In the Zone 2022-12-06 04:08:29
Ode to the Bouncer Studio Killers Studio Killers (Special Edition) 2022-12-03 22:21:45
Bubblegum Bitch MARINA Electra Heart (Deluxe) 2022-12-03 22:03:39
Thank You for the Venom My Chemical Romance Three Cheers for Sweet Revenge 2022-12-03 21:58:09

Spotify is not my girlfriend’s main music streaming service so the data may be slightly skewed but it will be sufficient for this purpose.

Who are my top Artists and Their Genres?

name genres
Doja Cat dance pop, pop
Paramore candy pop, pixie, pop emo, pop punk
PinkPantheress
Fall Out Boy emo, modern rock
Pierce The Veil screamo

Looking at this, we can see that my girlfriend (or me) is an avid listener of emo and pop music. This follows the trend of her recently listened to music seeing as her recently listened to included artists such as Doja Cat, My Chemical Romance, and Studio Killers.

Which of my Favorites are the Most Upbeat?

Doja Cat

Fall Out Boy

Pierce The Veil

Looking at the results of the highest valence, we can see that Fall Out Boy has the most upbeat, joyous, and therefore attractive songs out of the three artists we compared.

PART 3

How does the level of valence for our most “joyous” favorite artist Fall Out Boy compare to levels of energy and danceability?

As we can see valence does seem to be correlated to the energy and danceability levels. As we can see here, the graph shows that for the songs with high valence levels, or attractiveness to the listener, the danceability levels are also high. The energy levels are lower for more danceabilty, however, the difference is small and the danceablity and enjoyment levels are still very high!