Using the Spotify API - comes from the music app Spotify - tracking my personal Spotify data based on listening history
Step 1: - Load up libraries
library(spotifyr)
library(tidyverse)
library(knitr)
library(lubridate)
Step 2: - Creates a new dataset that: - Gives me who my top artists are going from the most followers down
topartists <- get_my_top_artists_or_tracks(type = 'artists', time_range = 'long_term',
limit = 8) %>%
arrange(-followers.total) %>%
select(name,popularity,genres,followers.total)
Step 3: Create a barplot showing my top artists and their total followers
topartists %>%
ggplot(aes(x = name, y = followers.total))+
geom_bar(stat = "summary", fun = mean, fill = "blue")+
labs(title = "Which artists gets more followers",
y = "followers")
Final Analysis:
The barplot shows me my top 8 artists and which artists have the most followers.
Bad Bunny clearly has a lot more followers than anyone on this list, understandably because he has a wide variety of listerners all over the globe.
KSuave is an “underground artist” in other words, he is not a mainstream artist, which makes sense as to why his bar is so low.