]> code.communitydata.science - coldcallbot-discord.git/blob - assessment_and_tracking/track_participation.R
updated enrollment tracking code (just filenames)
[coldcallbot-discord.git] / assessment_and_tracking / track_participation.R
1 setwd("~/online_communities/coldcallbot/data/")
2
3 library(ggplot2)
4 library(data.table)
5
6 gs <- read.delim("student_information.tsv")
7 d <- gs[,c(2,4)]
8 colnames(d) <- c("student.num", "unique.name")
9
10 call.list <- do.call("rbind", lapply(list.files(".", pattern="^call_list-.*tsv$"), function (x) {read.delim(x, stringsAsFactors=FALSE)[,1:4]}))
11
12 colnames(call.list) <- gsub("_", ".", colnames(call.list))
13
14 table(call.list$unique_name[call.list$answered])
15
16 ## drop calls where the person wasn't present
17 call.list.full <- call.list
18 call.list[!call.list$answered,]
19 call.list <- call.list[call.list$answered,]
20
21 call.counts <- data.frame(table(call.list$unique.name))
22 colnames(call.counts) <- c("unique.name", "num.calls")
23
24 d <- merge(d, call.counts, all.x=TRUE, all.y=TRUE, by="unique.name"); d
25

Community Data Science Collective || Want to submit a patch?