-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquiz_1_data.Rmd
115 lines (82 loc) · 3.68 KB
/
quiz_1_data.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
title: Quiz Data
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(cache=TRUE)
library(tidyverse)
library(lubridate)
library(viridis)
library(zoo)
library(janitor)
library(broom)
library(ggthemes)
library(directlabels)
library(kableExtra)
library(stargazer)
library(scales)
library(ggrepel)
library(readxl)
colors_tableau10<-function()
{
return(c("#1F77B4", "#FF7F0E", "#2CA02C", "#D62728", "#9467BD", "#8C564B",
"#E377C2", "#7F7F7F", "#BCBD22", "#17BECF"))
}
class_clean<-function(){
theme_classic()+
theme(
plot.subtitle = element_text(color="grey10",size=rel(.7)),
plot.title = element_text(face="bold",size=rel(.8)),
plot.caption = element_text(color="grey50",size=rel(.5),hjust=0),
legend.title = element_text(color="grey10",size=rel(.5)),
legend.text = element_text(color="grey10",size=rel(.5)),
axis.text = element_text(size=rel(1.5)),
axis.title = element_text(size=rel(1.5)),
#panel.grid.major = element_line(size=0,colour = "black"),
#plot.margin = margin(t = .1, r = .1, b = .1, l = .1,unit= "cm"),
plot.margin = margin(t = .5, r = 1, b = .25, l = 1,unit= "cm"),
#axis.text.x = element_text(margin = margin(t = 10, r = 0, b = 0, l = 0)),
NULL)
}
```
```{r quiz_data,echo=FALSE,warnings=FALSE,include=FALSE,,cache=FALSE}
sections<- read_csv("private/eclass_import.csv") %>% select(student_id,sec)
quiz_data<-read_excel("private/quizzes.xlsx") %>% clean_names()%>%select(quiz_grade,samples_completed,student_id) %>% left_join(sections)
quiz_A1<-quiz_data %>% filter(sec=="A1")
quiz_A2<-quiz_data %>% filter(sec=="A2")
quiz_A3<-quiz_data %>% filter(sec=="A3")
```
The quiz average over all three sections was `r round(mean(quiz_data$quiz_grade/10*100,na.rm=T),2)`%.
The quiz averages for the individual sections were `r round(mean(quiz_A1$quiz_grade/10*100,na.rm=T),2)`% for section A1, `r round(mean(quiz_A2$quiz_grade/10*100,na.rm=T),2)`% for section A2 and `r round(mean(quiz_A3$quiz_grade/10*100,na.rm=T),2)`% for section A3.
```{r quiz_graphs,echo=FALSE,warnings=FALSE,include=FALSE,,cache=FALSE}
all<-ggplot(quiz_data%>%filter(!is.na(quiz_grade)),aes(quiz_grade))+
geom_density(aes(),alpha=0.5,fill="dodgerblue")+
labs(x="Range of Scores",y="Probability Density",
title="Distribution of Quiz Scores",
caption="Kernel-smoothed so you won't necessarily find your actual grade",
fill=guide_legend(title="Section"),color=guide_legend(title="Section"))
sec<-ggplot(quiz_data%>%filter(!is.na(quiz_grade)),aes(quiz_grade,group=sec))+
geom_density(aes(fill=sec,colour=sec),alpha=0.5)+
labs(x="Range of Scores",y="Probability Density",
title="Distribution of Quiz Scores by Section",
caption="Kernel-smoothed so you won't necessarily find your actual grade",
fill=guide_legend(title="Section"),color=guide_legend(title="Section"))
samples<-ggplot(quiz_data%>%filter(!is.na(quiz_grade)),aes(quiz_grade,group=factor(samples_completed)))+
geom_density(aes(fill=factor(samples_completed),colour=factor(samples_completed)),alpha=0.5)+
labs(x="Range of Scores",y="Probability Density",
title="Distribution of Quiz Scores by Number of Sample Quizes Completed",
caption="Kernel-smoothed so you won't necessarily find your actual grade",
fill=guide_legend(title="Sample\nQuizzes\nCompleted"),color=guide_legend(title="Sample\nQuizzes\nCompleted"))
```
## Grade Distribution
```{r dist_graph,fig.width=12,fig.height=7,echo=FALSE}
all
```
## Grade Distribution By Section
```{r dist_graph_sec,fig.width=12,fig.height=7,echo=FALSE}
sec
```
## Grade Distribution By Preparation
```{r dist_graph_prep,fig.width=12,fig.height=7,echo=FALSE}
samples
```