X-Git-Url: https://code.communitydata.science/coldcallbot-discord.git/blobdiff_plain/a59b6b86ffa275cfa425210a9e6b5e3007c7b518..a50468cac2f57d05f7c6a4066e34f82b02fa2693:/assessment_and_tracking/track_participation.R diff --git a/assessment_and_tracking/track_participation.R b/assessment_and_tracking/track_participation.R index c2b1ef9..37898e7 100644 --- a/assessment_and_tracking/track_participation.R +++ b/assessment_and_tracking/track_participation.R @@ -96,23 +96,19 @@ color.gradient <- scales::seq_gradient_pal("yellow", "magenta", "Lab")(seq(0,1,l table(d$num.calls, d$absences) -ggplot(data=d) + - aes(x=as.factor(num.calls), y=absences) + - geom_violin() - -## png("questions_absence_histogram_combined.png", units="px", width=600, height=400) +png("questions_absence_histogram_combined.png", units="px", width=600, height=400) ggplot(d) + aes(x=as.factor(num.calls), fill=as.factor(absences)) + geom_bar(color="black") + stat_count() + - scale_x_discrete("Number of questions asked") + + scale_x_discrete("Number of questions answered") + scale_y_continuous("Number of students") + ##scale_fill_brewer("Absences", palette="Blues") + scale_fill_manual("Absences", values=color.gradient) + theme_bw() -## dev.off() +dev.off() absence.labeller <- function (df) { lapply(df, function (x) { paste("Absences:", x) }) @@ -120,12 +116,12 @@ absence.labeller <- function (df) { ## png("questions_absence_histogram_facets.png", units="px", width=600, height=400) -ggplot(d) + - aes(x=as.factor(num.calls)) + - geom_bar() + - stat_count() + - scale_x_discrete("Number of questions asked as of 2020-02-12") + - scale_y_continuous("Number of students") + - theme_bw() + - facet_wrap(.~absences, ncol=5, labeller="absence.labeller") +## ggplot(d) + +## aes(x=as.factor(num.calls)) + +## geom_bar() + +## stat_count() + +## scale_x_discrete("Number of questions answered") + +## scale_y_continuous("Number of students") + +## theme_bw() + +## facet_wrap(.~absences, ncol=5, labeller="absence.labeller")