From 5d5bea65d48ecd9c4e4e8c2d15c3ece72d96a7c6 Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Mon, 12 Oct 2020 10:49:41 -0700 Subject: [PATCH] code to track enrolled students and who is missing --- data/track_enrolled.R | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 data/track_enrolled.R diff --git a/data/track_enrolled.R b/data/track_enrolled.R new file mode 100644 index 0000000..1923dbf --- /dev/null +++ b/data/track_enrolled.R @@ -0,0 +1,23 @@ +myuw <- read.csv("myuw-COM_482_A_autumn_2020_students.csv") +gs <- read.delim("student_information.tsv") + +## these are students who dropped the class (should be empty) +gs[!gs$Your.UW.student.number %in% myuw$StudentNo,] + +## these are students who are in the class but didn't reply to the form +myuw[!myuw$StudentNo %in% gs$Your.UW.student.number,] + +## read all the folks who have been called and see who is missing from +## the google sheet + +call.list <- unlist(lapply(list.files(".", pattern="^attendence-.*tsv$"), function (x) { + d <- read.delim(x) + strsplit(d[[2]], ",") +})) + +present <- unique(call.list) +present[!present %in% gs[["Your.username.on.the.class.Discord.server"]]] + +## and never attended class.. +gs[["Your.username.on.the.class.Discord.server"]][!gs[["Your.username.on.the.class.Discord.server"]] %in% present] + -- 2.39.5