2 Visualization for teacher
Let’s say, we need to provide teachers with insightful visualizations about their courses to support desicion-making.
First question - how well students are coping with the course?
df_score = read_csv("./data/studentAssessment.csv")
df_score = df_score %>%
left_join(read_csv("./data/assessments.csv")) %>%
mutate(code_module = ifelse(code_module == "AAA" & code_presentation == "2013J", "AAA", "others"))
p1 = ggplot() +
geom_bkde(data = df_score, aes(x = score, fill = code_module), alpha = 0.3, bandwidth = 5, size = 0.2, color = "black") +
geom_vline(xintercept = 40, linetype = "dashed") +
theme_classic() +
theme(legend.position = "top")
p2 = ggplot() +
geom_boxplot(data = df_score, aes(x = code_module, y = score, fill = code_module)) +
geom_hline(aes(yintercept = 40), linetype = "dashed") +
theme_classic() +
coord_flip() +
ylim(0, 100) +
theme(legend.position = "none")
p1 + p2 + patchwork::plot_layout(ncol = 1)
Notes:
- Смотрим распределение оценок за задания на курсе - оно нам важно (особенно сравнение с тем какое распределение у других курсов) - денсити плот
- смотрим с другой стороны - рисуем боксплоты (показывают доли распределения)
- видим что вообще балл на нашем курсе получают меньший чем в среднем по другим курсам (высоких оценок не так много)
- НО! низких оценок меньше чем в среднем (и доля несдавших курс - меньше)
- нам важно сколько успешно прошло курс (вне зависимости от того как оценивались их работы) - рисуем
(Пункт 11 из раздатки)
Score for assignments is an important measure, but even more important is how many people passed the whole course. We can modify one of the graphs used in the researcher’s dashboard.
ggplot() +
geom_point(data = df_courses, aes(x = count_students, y = share_passed)) +
ggrepel::geom_text_repel(data = df_courses, aes(x = count_students, y = share_passed, label = str_c(code_module, "_", code_presentation))) +
geom_smooth(data = df_courses, aes(x = count_students, y = share_passed), method = "lm", se = FALSE) +
theme_bw()
It is not important for the teacher what are the exact positions of other courses. We should provide him with a more recognizable reference point/line/area.
p_passed = ggplot() +
geom_point(data = df_courses_aaa, aes(x = count_students, y = share_passed), size = 3) +
ggrepel::geom_text_repel(data = df_courses_aaa, aes(x = count_students, y = share_passed, label = str_c("Your course: ", code_module, "_", code_presentation)), nudge_x = 600, arrow = arrow(length = unit(0.02, "npc")), point.padding = unit(0.05, "npc")) +
geom_smooth(data = df_courses, aes(x = count_students, y = share_passed), method = "lm", se = TRUE, level = 0.99, color = NA) +
annotate("text", x = 1500, y = 52, label = "Most of the courses are in this area", angle = -7.5) +
theme_bw() +
ylim(0, 100)
p_passed
p_passed_new = ggplot() +
geom_density(data = df_courses, aes(x = share_passed), fill = "gray95") +
geom_vline(xintercept = df_courses_aaa$share_passed, linetype = "dashed") +
annotate("text", x = df_courses_aaa$share_passed + 5, y = 0.0225, label = str_c(df_courses_aaa$share_passed, "% of students passed your course")) +
xlim(0, 100) +
theme_classic() +
coord_flip()
p_passed_new
# p_passed_new = ggplot() +
# geom_histogram(data = df_courses, aes(x = share_passed), fill = "gray95", color = "black", binwidth = 10) +
# geom_vline(xintercept = df_courses_aaa$share_passed, linetype = "dashed") +
# annotate("text", x = df_courses_aaa$share_passed + 5, y = 5.5, label = str_c(df_courses_aaa$share_passed, "% of students passed your course")) +
# xlim(0, 100) +
# theme_classic() +
# coord_flip()
#
# p_passed_new
How might the dashboard looks like?