---
title: "Comp/Stat 112: Factors"
author: "INSERT STUDENTS NAME HERE"
output:
  bookdown::html_document2:
    split_by: none
    toc: yes
    toc_depth: 3
    toc_float:
      toc_collapsed: true
    number_sections: false
---

```{r 10_setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, error = TRUE)
library(tidyverse)
library(ggplot2)
```

# Categorical Variables as Factors

```{r,cache=TRUE}
Grades <- read_csv("https://bcheggeseth.github.io/112_fall_2022/data/grades.csv")
Grades <- Grades %>%
  select(sid, sessionID, grade) %>%
  distinct(sid, sessionID, .keep_all = TRUE)

Grades <- Grades %>%
  mutate(grade = factor(grade)) #converts grade to a factor in R

GradeDistribution <- Grades %>% #summarized grade frequencies
  group_by(grade) %>%
  summarize(count = n())

Courses <- read_csv("https://bcheggeseth.github.io/112_fall_2022/data/courses.csv")
```


```{exercise}
Now that you've developed your data visualization and wrangling skills, 
``` 

a. develop a research question to address with the grades and courses data,

> ANSWER:

```{r}

```

b. create a high quality visualization that addresses your research question,

> ANSWER:

```{r}

```

c. write a brief description of the visualization and include the insight you gain about the research question.

> ANSWER:


