songs$explicittext <-
ifelse(songs$Explicit==FALSE,"Not explicit","Explicit")
songs %>%
ggplot(aes(x=explicittext, y = Popularity)) +
geom_bar(stat = "summary", fun = mean) +
labs(title = "Average Popularity Score of Explicit vs. Non-Explicit Songs",
x = "Explicity",
y = "Average Popularity")Class Activity 10/12
Spotify Question:
How do explicit and non explicit songs compare in popularity? I will answer this question by creating a new explicity vector. I will then put this vector and the average popularity for explicit and non-explicit songs into a bar chart to compare their average popularity.
The bar chart shows that explicit songs are on average about 7 points more popular than non-explicit songs.