---
title: "Final Grades report for 36-617, Fall 2022"
author: "Brian Junker"
date: "12/20/2022"
output: 
  pdf_document:
    keep_tex: true
    
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
\large
\parskip=2em

```{r include=FALSE}
data <- read.csv("2022-12-20T1442_Grades-36617-A.csv"
                ,header=T)

## data <- data[data$Section=="36463-A",]

## grep("Current",names(data),value=T)

hw <- data$Homework.Current.Score

pa <- data$Participation.Current.Score

th <- data$Take.Home.Midterm.Current.Score

qu <- data$Quizzes.Current.Score

cs <- data$Current.Score

cg <- data$Current.Grade

pr <- data$Peer.Review.Current.Score
  
rp <- data$Final.Report.Project.Current.Score

```

Here are the weights that I used for your final semester scores, as indicated in the course syllabus.

\def\z{\phantom{0}}

\begin{tabular}{rl}
Category              & Final \\
\hline
Homework              & 20\%  \\ 
Takehome Midterm      & 25\%  \\
Participation         & 10\%  \\
Quizzes               & 10\%  \\
Peer Review           & 10\%  \\
Final Report Project  & 25\%  
\end{tabular}
Histograms of each category score are shown on the next page.

And here are the letter grades for the semester, using the weighted average of the categories above:
```{r echo=FALSE}
cnt <- as.data.frame(table(cg))
cnt.A <- with(cnt,Freq[cg=="A"])
if (length(cnt.A)==0) cnt.A <- 0
cnt.B <- with(cnt,Freq[cg=="B"])
if (length(cnt.B)==0) cnt.B <- 0
cnt.C <- with(cnt,Freq[cg=="C"])
if (length(cnt.C)==0) cnt.C <- 0
cnt.D <- with(cnt,Freq[cg=="D"])
if (length(cnt.D)==0) cnt.D <- 0
cnt.R <- with(cnt,Freq[cg=="R"])
if (length(cnt.R)==0) cnt.R <- 0
pad <- function(x) {
  xs <- paste0("~~~~~",x)
  l <- nchar(xs)
  return(substr(xs,l-2,l))
  }
```

\begin{tabular}{ccc}
 & Weighed Average & Number of \\
Letter & Interval & Students \\
\hline
A & $[90,100]$ & `r pad(cnt.A)` \\
B & $[80,90)$ & `r pad(cnt.B)` \\
C & $[65,80)$&  `r pad(cnt.C)` \\
D & $[50,65)$ & `r pad(cnt.D)` \\
R & $[0,50)$ &  `r pad(cnt.R)`
\end{tabular}


```{r echo=FALSE, fig.height=9}
par(mfrow=c(4,2))

hist(hw,main="Homework")
hist(pa,main="Participation")
hist(th,main="Takehome")
hist(qu,main="Quizzes")
hist(cs,main="Weighted Average")
hist(pr,main="Peer Review")
hist(rp,main="Final Report Project")



```


