---
title: "How do External Factors Impact Final Grades in Online Science Courses?"
output:
flexdashboard::flex_dashboard:
theme:
version: 4
bootswatch: pulse
source_code: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(janitor)
course_text <- read_csv("data/course-text.csv") |>
clean_names()
data_to_viz <- course_text |>
select(course_id,
gender,
time_spent_hours,
final_grade,
enrollment_reason,
negemo,
posemo) |>
separate(course_id, c("subject", "semester", "section")) |>
mutate(subject = recode(subject,
"AnPhA" = "Anatomy",
"BioA" = "Biology",
"FrScA" = "Forensics",
"OcnA" = "Oceanography",
"PhysA" = "Physics"))
```
## Inputs {.sidebar}
Life outside of the classroom impacts how students perform in the classroom. This is especially true for online classes where the classroom is often the students' own home. This visualization dashboard examines how the reasons students enroll in online science courses impacts their final grades, as well as the impact of positive and negative emotions.
## Column {data-width="600"}
### How is Enrollment Reason Related to Final Grades?
```{r}
data_to_viz %>%
ggplot() +
geom_histogram(mapping = aes(x = final_grade, fill = enrollment_reason),
binwidth = 10, boundary = 0) +
facet_wrap(~enrollment_reason) +
labs(title = "Grade Distribution by Enrollment Reason", x = "Final Grade",
y = "Number of Students") +
guides(fill = "none")
```
## Column {data-width="400"}
### Are Negative Emotions Related to Final Grades and Enrollment Reason?
```{r}
data_to_viz %>%
ggplot(mapping = aes(x = negemo, y = final_grade)) +
geom_point() +
facet_wrap(~enrollment_reason) +
labs(title = "Grade Distribution by Negative Emotions", x = "Negative Emotion",
y = "Final Grade")
```
### What About Positive Emotions?
```{r}
data_to_viz %>%
ggplot(mapping = aes(x = posemo, y = final_grade)) +
geom_point() +
facet_wrap(~enrollment_reason) +
labs(title = "Grade Distribution by Negative Emotions", x = "Positive Emotion",
y = "Final Grade")
```