Created
July 6, 2015 16:53
-
-
Save earino/75bb2ce7992538212c56 to your computer and use it in GitHub Desktop.
visualization of cs100.1x participation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(gridExtra) | |
cs_100.1x <- data.frame(state=c("Enrolled", | |
"Active", | |
"Completed a Quiz", | |
"Installed the VM", | |
"Completed Lab 1", | |
"Completed Lab 2", | |
"Completed Lab 3", | |
"Completed Lab 4"), | |
count=c(70000, 26510, 17092, 16675, | |
10472, 8356, 6634, 3899)) | |
cs_100.1x$state = factor(cs_100.1x$state, levels=c("Enrolled", | |
"Active", | |
"Completed a Quiz", | |
"Installed the VM", | |
"Completed Lab 1", | |
"Completed Lab 2", | |
"Completed Lab 3", | |
"Completed Lab 4")) | |
p1 <- ggplot(cs_100.1x, aes(x=state, y=count)) + geom_bar(stat="identity") + | |
geom_text(aes(label=count), y=0, color="white", vjust=-.25, fill="white") + | |
xlab("Task Completed") + | |
ylab("Number of Students") + | |
theme(axis.text.x = element_text(angle = 45, hjust = 1, size=15)) + | |
ggtitle("Student Participation in BerkeleyX: CS100.1x Introduction to Big Data with Apache Spark") | |
g <- arrangeGrob(p1, | |
sub = textGrob("Data from http://bit.ly/1KH7bq3", x = 0, hjust = -0.1, vjust=0.1, | |
gp = gpar(fontface = "italic", fontsize = 10))) | |
g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment