public

  • Download Gist
Breaking Bad Episode rating R script.R
R
1 2 3 4 5 6 7 8 9 10
library(ggplot2)
 
# Load and format data.
bb <- read.csv("bb.csv")
fr <- data.frame(idx=as.numeric(1:57), rating=bb$User.Rating, season=factor(bb$Season))
 
# Print graph.
png("/tmp/bb.png", width=1280, height=768)
gplot(data=fr, aes(x=fr$idx, y=fr$rating, color=season)) + geom_point(size=3) + geom_smooth(aes(group=fr$season), method="lm") + labs(x="", y="User rating", color="Season", title="Breaking Bad episode rating")
dev.off()

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.