spotify %>%
ggplot(aes(x = explicit, y = popularity, fill = explicit)) +
geom_bar(stat = "summary", fun = "mean") +
labs(title = "Popularity of Songs (Explicit vs. Non-Explicit)",
x = "Explicit",
y = "Average Popularity")Assignment 3 - Are explicit songs more popular than non-explicit?
Question: Are explicit songs more popular than non-explicit?
In order to answer this question, I will be using Spotify Tracks Dataset to observe which songs are explicit or not and their popularity levels.
Next, I will use the ‘ggplot2’ package to create a bar plot that will visualize the average popularity of songs that are explicit or not explicit.
The echo: false option disables the printing of code (only output is displayed).
Descriptive Analysis
As you can tell from the box plot, the visualization tells me that, yes, explicit songs are more popular than non-explicit songs. I can tell that explicit songs are more popular because they have a higher average popularity are larger bar than those that are non-explicit.