X-Git-Url: https://code.communitydata.science/coldcallbot-discord.git/blobdiff_plain/e98bacabb8a1e7095a966f1461bf4a345a60433e..9c4f81c30ac7c23cf1dfad7af54d1f12d4ba4d58:/data/track_participation.R?ds=sidebyside diff --git a/data/track_participation.R b/data/track_participation.R deleted file mode 100644 index d44e74d..0000000 --- a/data/track_participation.R +++ /dev/null @@ -1,24 +0,0 @@ -library(ggplot2) - -gs <- read.delim("student_information.tsv") -d <- gs[,c(2,5)] -colnames(d) <- c("student.num", "discord.name") - -call.list <- do.call("rbind", lapply(list.files(".", pattern="^call_list-.*tsv$"), function (x) {read.delim(x)})) -colnames(call.list) <- gsub("_", ".", colnames(call.list)) - -call.counts <- data.frame(table(call.list$discord.name)) -colnames(call.counts) <- c("discord.name", "num.calls") - -d <- merge(d, call.counts, all.x=TRUE, all.y=TRUE, by="discord.name"); d - -## set anything that's missing to zero -d$num.calls[is.na(d$num.calls)] <- 0 - -attendance <- unlist(lapply(list.files(".", pattern="^attendance-.*tsv$"), function (x) {d <- read.delim(x); strsplit(d[[2]], ",")})) - -attendance.counts <- data.frame(table(attendance)) -colnames(attendance.counts) <- c("discord.name", "num.present") - -d <- merge(d, attendance.counts, all.x=TRUE, all.y=TRUE, by="discord.name"); d -