knitr::opts_chunk$set(error = TRUE, echo=FALSE, cache=FALSE) library(ggplot2) library(SeminarMatching) library(dplyr) library(tidyr) library(reshape2)
setwd("D:/libraries/SeminarMatching/semapps/shared/reports") semester = "SS17" db.dir = paste0("../db") round = 1 semdb = dbConnect(dbname=paste0(db.dir,"/semDB.sqlite"), drv = SQLite()) seminars = dbGet(semdb,"seminars",nlist(semester, active=TRUE)) students = dbGet(semdb,"students",nlist(semester))
seminars = filter(seminars, active==TRUE) studpref = dbGet(semdb,"studpref",nlist(semester)) has.studpref = NROW(studpref) if (has.studpref) { df = studpref %>% group_by(userid) %>% summarize(num_ranked = n()) students = left_join(students, df, by="userid") %>% mutate(num_ranked = ifelse(is.na(num_ranked), 0,num_ranked)) } else { students$num_ranked = 0 } num.studs = length(unique(students$userid)) num.sems = length(unique(seminars$semid)) total.slots = sum(seminars$slots)
df = seminars %>% group_by(semBAMA) %>% summarize(Number_Seminars=n(), Total_Slots=sum(slots)) df
Note: some lecturers may have split their seminar in the software into sub seminars to better allocate students to topic areas. Hence the number of seminars here may seem larger than in the official course list.
r num.studs
students have registered and r sum(students$num_ranked >0)
of them have submitted seminar preferences (with_pref).students %>% group_by(studBAMA) %>% summarize(num_students=n(), with_pref=sum(num_ranked>0))
A list by subject:
students %>% group_by(studBAMA, studSubject) %>% summarize(num_students=n(), with_pref=sum(num_ranked>0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.