AvgYearlyPOP <- sqldf(“SELECT AVG(Popularity) AS Avg_Pop,
Top_Year,
Artist_Type
FROM Spotify
GROUP BY Top_Year, Artist_Type”)
ggplot(AvgYearlyPOP, aes(x = as.factor(Top_Year), y = Avg_Pop))
+ geom_bar(fill = Artist_Type)
I tried the Code that I put on there I was expecting 4 different Bars for Every year because that is how many artist types there are. But I ran the Code and it shows me and empty graph. But the Axis’s are labeled correctly.
Jerry Riggins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.