State University Youth Initiative District
#clear memory
rm(list = ls())
#penalize excessive significant figures
options(digits = 3)
#preventing scientific notation
options(scipen = 10)
#packages used in this analysis, will install packages if not installed
if(!require(knitr)){
install.packages("knitr", dependencies = TRUE)
library(knitr)
}
if(!require(tidyverse)){
install.packages("tidyverse", dependencies = TRUE)
library(tidyverse)
}
if(!require(haven)){
install.packages("haven", dependencies = TRUE)
library(haven)
}
if(!require(janitor)){
install.packages("janitor", dependencies = TRUE)
library(janitor)
}
if(!require(ggthemes)){
install.packages("ggthemes", dependencies = TRUE)
library(ggthemes)
}
if(!require(readxl)){
install.packages("readxl", dependencies = TRUE)
library(readxl)
}
if(!require(RColorBrewer)){
install.packages("RColorBrewer", dependencies = TRUE)
library(RColorBrewer)
}
if(!require(ggalt)){
install.packages("ggalt", dependencies = TRUE)
library(ggalt)
}
if(!require(ggrepel)){
install.packages("ggrepel", dependencies = TRUE)
library(ggrepel)
}
if(!require(kableExtra)){
install.packages("kableExtra", dependencies = TRUE)
library(kableExtra)
}
if(!require(waffle)){
install.packages("waffle", dependencies = TRUE)
library(waffle)
}#set global output chunk options
knitr::opts_chunk$set(echo=TRUE, message=FALSE, warning=FALSE, collapse = F, highlight = T, results = "asis")# Import Data
data <- read_xlsx("interview_data.xlsx")
#setting theme and centering the titles for ggplots
theme_set(theme_classic())# A little bit of cleaning
## Remove empty columns
data <- clean_names(data) %>%
remove_empty(which = c("rows", "cols"), quiet = TRUE)
##Rename columns
data <- data %>%
rename(
latinx = ethnicity_desc_p,
race = race_desc_p,
homeless = is_homeless,
school = school_name2010,
gpa = gpa2014,
bilingual = bilg2014,
fall_math = x2013fall_math_rit,
winter_math = x2014wtr_math_rit,
spring_math = x2014spr_math_rit,
fall_reading = x2013fall_read_rit,
winter_reading = x2014wtr_read_rit,
spring_reading = x2014spr_read_rit,
suyi = suyi_focus_students
)
#Turn some character values to numbers
data$latinx <- if_else(data$latinx == "Hispanic/Latino", 1, 0)
data$sex <- recode(data$sex, "M" = "Male", "F" = "Female")
data$homeless <- recode(data$homeless, "N" = 0, "Y" = 1)
data$sped <- recode(data$sped, "N" = 0, "Y" = 1)
data$bilingual <- recode(data$bilingual, "N" = 0, "Y" = 1)
data$suyi <- recode(data$suyi, "1" = "SUYI-Focus", "0" = "SUYI")
# Growth Index for math and reading
data <- data %>%
mutate(math_growth = spring_math - fall_math ) %>%
mutate(reading_growth = spring_reading - fall_reading)
# make sure data is classified correctly
data <- data %>% hablar::retype()
# Treat some variables as factors
data$suyi <- as.factor(data$suyi)
data$sped <- as.factor(data$sped)
data$race <- as.factor(data$race)
data$school <- as.factor(data$school)
# Turn NAs in home language variable to English
#Turn NAs to zero for Race and Ethnicity Columns
data <- data %>%
mutate_at(vars(home_language, primary_language), ~replace_na(., "English"))
#Make dataset of only variables used for analysis
df <- data %>% select(-c(suyi_zone, status2014, withdraw_date, proj_grad_year))
#Create "Grade Level" column
df <- df %>%
mutate(grade_level =
case_when(grade %in% c("1", "2", "3", "4", "5", "K") ~ "elementary",
grade %in% c("6", "7", "8") ~ "middle",
grade %in% c("9", "10", "11", "12") ~ "high school"))
#Make grade_level a factor
df$grade_level <- factor(df$grade_level,
levels = c("elementary", "middle", "high school"),
labels = c("elementary", "middle", "high school"))
#Turn data into long format for visualization
df_long <- pivot_longer(df, cols = fall_math:spring_reading) %>%
separate(name, c("semester", "subject"), sep = "_") %>%
rename(rit_score = value)
#Make elementary, middle, and hs data frames
elem <- df %>% filter(grade_level == "elementary")
middle <- df %>% filter(grade_level == "middle")
hs <- df %>% filter(grade_level == "high school")
#Make semester a factor
df_long$semester <- factor(df_long$semester,
levels = c("fall", "winter", "spring"),
labels = c("fall", "winter", "spring"))# Prepare data for visualizations
#Create smaller data frame for dumbbell viz
## Summarize Mean by School
mean_math <- df %>%
group_by(school, grade_level) %>%
summarise(mean_fall_math = mean(fall_math, na.rm = T),
mean_spring_math = mean(spring_math, na.rm = T))
mean_read <- df %>%
group_by(school,grade_level) %>%
summarise(mean_fall_reading = mean(fall_reading, na.rm = T),
mean_spring_reading = mean(spring_reading, na.rm = T))
## Turn summaries into a dataframe
mean_math <- as.data.frame(mean_math)
mean_read <- as.data.frame(mean_read)
## Create a Mean difference column
mean_math <- mean_math %>%
mutate(mean_math_diff = round(mean_spring_math - mean_fall_math,2))
mean_read <- mean_read %>%
mutate(mean_reading_diff = round(mean_spring_reading - mean_fall_reading,2))
#For waffle plot
homeless <- c(Homeless = 7, `Not Homeless`= 93)
bilingual <- c(Bilingual = 34, Monolingual= 66)# Create Mean_Read and Mean_Math datasets for each grade level
## Math
elem_mean_math <- mean_math %>% filter(grade_level == "elementary") %>% arrange(desc(mean_math_diff))
middle_mean_math <- mean_math %>% filter(grade_level == "middle") %>% arrange(desc(mean_math_diff))
hs_mean_math <- mean_math %>% filter(grade_level == "high school") %>% arrange(desc(mean_math_diff))
## Reading
elem_mean_reading <- mean_read %>% filter(grade_level == "elementary") %>% arrange(desc(mean_reading_diff))
middle_mean_reading <- mean_read %>% filter(grade_level == "middle") %>% arrange(desc(mean_reading_diff))
hs_mean_reading <- mean_read %>% filter(grade_level == "high school") %>% arrange(desc(mean_reading_diff))# Order School variable by mean reading difference variable
## Reading
elem_mean_reading$school <- fct_reorder(elem_mean_reading$school, elem_mean_reading$mean_reading_diff, max)
middle_mean_reading$school <- fct_reorder(middle_mean_reading$school, middle_mean_reading$mean_reading_diff, max)
hs_mean_reading$school <- fct_reorder(hs_mean_reading$school, hs_mean_reading$mean_reading_diff, max)
## Math
elem_mean_math$school <- fct_reorder(elem_mean_math$school, elem_mean_math$mean_math_diff, max)
middle_mean_math$school <- fct_reorder(middle_mean_math$school, middle_mean_math$mean_math_diff, max)
hs_mean_math$school <- fct_reorder(hs_mean_math$school, hs_mean_math$mean_math_diff, max)Key Takeaways
Youth Initiative District students make steady gains in reading and math in elementary and middle school but tend to regress in high school.
On average, Youth Initiative District students miss 12 days of instruction. Most of the absenteeism is occurring at the high school level.
Male students of color in high school are experiencing the lowest amount of RIT math growth.
Summary of Findings
The State University Youth Initiative District (SUYI) is comprised of 881 students across 16 schools consisting of elementary, middle, and high school students. SUYI is rich in diversity; there are 13 different races/ethnicities, over 10 primary languages, and a host of other characteristics that make this a rich community of students. Unfortunately, many SUYI students struggle with absenteeism and declining MAP Growth Rasch UnIT (RIT) scores.
Students are considered “chronically absent” when they miss 10% or more days of instruction in one academic school year (Childs & Lofton, 2021). Chronic absenteeism can lead to students missing crucial instructional time, ultimately causing them to fall behind in academics. Furthermore, when students miss school, they also miss critical social interaction times that develop their interpersonal skills. According to this analysis, SUYI students miss an average of 12 days of instruction, which is about 7% of the school year in Washington State. High School students make up for most of the days missed, with New Futures Alternative, Cascade High School, and Olympic High School having the highest median of absenteeism (20-48 missed days). On the other hand, elementary school students account for the least absences. Horizon, Franklin, and Valley Elementary have the lowest amount of students missing school (4-6 missed days).
RIT scores range from about 100–300. According to Joi Converse (2016), third-grade students usually score at the 180–200 level and progress to the 220–260 level by high school. SUYI elementary students fall within the usual RIT score range and make considerable gains in middle school. However, improvements begin to slow down and, in some cases, regress for high school students. Declines in math RIT scores occurred from fall to winter for high school students, particularly male students of color. Most of these declines may be coming from Cascade High School and New Futures Alternative. In terms of actual scores, the average high school reading and math score was below 220. More specifically, the average spring RIT score in math was below 220.
Based on this analysis, more attention needs to be given to male high school students of color with a primary focus on their math achievement. However, that achievement may not improve if high school students continue to miss school. Further analysis should be done to measure the statistical significance of students missing school on their academic achievement and the characteristics of students who are missing school and performing low in math. Lastly, caution should be taken with how much emphasis is given to RIT scores. Several scholars have noted inherent bias and lack of cultural awareness in standardized tests.
References:
Childs, J., & Lofton, R. (2021). Masking attendance: How education policy distracts from the wicked problem (s) of chronic absenteeism. Educational Policy, 35(2), 213-234.
Converse, J. (2016, October 25). Six commonly used MAP Growth terms worth knowing. NWEA. https://www.nwea.org/blog/2016/six-commonly-used-map-growth-terms-worth-knowing/
SUYI Schools and Students
#Create table
table <- data %>%
group_by(School = school) %>%
summarise("Total" = n()) %>%
arrange(desc(Total)) %>%
adorn_totals("row") %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns()
# Create html table
kable(table, caption= "Total Number of Students in the State University Youth Initiative District", col.names = c("School Name", "Percent (Total)")) %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T) %>% row_spec(c(17), bold = T)| School Name | Percent (Total) |
|---|---|
| Jackson High School | 18.5% (163) |
| Horizon Middle School | 17.9% (158) |
| Lincoln Elementary | 15.9% (140) |
| Monroe Elementary | 8.2% (72) |
| King K-8 School | 6.1% (54) |
| Kennedy Elementary | 5.4% (48) |
| Spring Crest Elementary | 5.4% (48) |
| Valley Elementary | 5.2% (46) |
| 21st Century K-8 School | 3.9% (34) |
| New Future Alternative | 3.0% (26) |
| Johnson High School | 2.7% (24) |
| Sound View Middle School | 2.6% (23) |
| Olympic High School | 1.6% (14) |
| Franklin Elementary | 1.5% (13) |
| Cascade High School | 1.0% (9) |
| Union Middle School | 1.0% (9) |
| Total | 100.0% (881) |
table <- elem %>%
group_by(School = school) %>%
summarise("Total" = n()) %>%
arrange(desc(Total)) %>%
adorn_totals("row") %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns()
kable(table, caption= "Elementary Schools (K-5)", col.names = c("School Name", "Percent (Total)")) %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T) %>% row_spec(c(9), bold = T)| School Name | Percent (Total) |
|---|---|
| Lincoln Elementary | 33.3% (140) |
| Monroe Elementary | 17.1% (72) |
| Kennedy Elementary | 11.4% (48) |
| Spring Crest Elementary | 11.4% (48) |
| Valley Elementary | 11.0% (46) |
| King K-8 School | 7.6% (32) |
| 21st Century K-8 School | 5.0% (21) |
| Franklin Elementary | 3.1% (13) |
| Total | 100.0% (420) |
table <- middle %>%
group_by(School = school) %>%
summarise("Total" = n()) %>%
arrange(desc(Total)) %>%
adorn_totals("row") %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns()
kable(table, caption= "Middle Schools (6-8)", col.names = c("School Name", "Percent (Total)")) %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T) %>% row_spec(c(7), bold = T)| School Name | Percent (Total) |
|---|---|
| Horizon Middle School | 69.3% (158) |
| Sound View Middle School | 10.1% (23) |
| King K-8 School | 9.6% (22) |
| 21st Century K-8 School | 5.7% (13) |
| Union Middle School | 3.9% (9) |
| New Future Alternative | 1.3% (3) |
| Total | 100.0% (228) |
table <- hs %>%
group_by(School = school) %>%
summarise("Total" = n()) %>%
arrange(desc(Total)) %>%
adorn_totals("row") %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns()
kable(table, caption= "High Schools (9-12)", col.names = c("School Name", "Percent (Total)")) %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T) %>% row_spec(c(6), bold = T)| School Name | Percent (Total) |
|---|---|
| Jackson High School | 70.0% (163) |
| Johnson High School | 10.3% (24) |
| New Future Alternative | 9.9% (23) |
| Olympic High School | 6.0% (14) |
| Cascade High School | 3.9% (9) |
| Total | 100.0% (233) |
data %>%
group_by(school) %>%
summarise("Total" = n()) %>%
ggplot(aes(school, Total,group= school)) +
geom_col(aes(x= reorder(school, Total)), fill = "#AA0000") +
scale_y_continuous(breaks = c(0,25,50,75,100,125,150,175)) +
labs(x = "School",
y = "Number of Students") + coord_flip() + theme(legend.position = "none")SUYI Student Demographics
# Students' Sex
table <- data %>%
group_by(suyi) %>%
count("Sex" = sex ) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns()
kable(table, caption = "Students' Sex", col.names = c("Group","Sex", "Percent (Total)"))%>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T) | Group | Sex | Percent (Total) |
|---|---|---|
| SUYI | Female | 35.9% (316) |
| SUYI | Male | 38.5% (339) |
| SUYI-Focus | Female | 13.2% (116) |
| SUYI-Focus | Male | 12.5% (110) |
data %>%
ggplot(aes(x= reorder(sex, primary_language,function(x)length(x)), fill= suyi)) + geom_bar(position = "dodge") + coord_flip() + labs(x= "Sex", fill = "Group") + scale_fill_manual(values=c("black","#AA0000"))# Students' Race
table <- data %>%
count("Racial Identity" = race, sort = T ) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns()
kable(table, caption = "Students' Racial Identity", col.names = c("Racial Identity", "Percent (Total)")) %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T)| Racial Identity | Percent (Total) |
|---|---|
| African American/Black | 48.8% (430) |
| Chinese | 13.5% (119) |
| Vietnamese | 11.5% (101) |
| White | 11.0% (97) |
| Other American Indian | 9.4% (83) |
| Filipino | 2.4% (21) |
| Other Asian | 1.8% (16) |
| Japanese | 0.5% (4) |
| Alaska Native | 0.3% (3) |
| Asian Indian | 0.2% (2) |
| Korean | 0.2% (2) |
| Samoan | 0.2% (2) |
| Cambodian | 0.1% (1) |
data %>%
ggplot(aes(x= reorder(race, primary_language,function(x)length(x)))) + geom_bar(position = "dodge", fill = "black") + coord_flip() + labs(x= "Racial Identity")# Students' Primary Language
table <- data %>%
filter(primary_language != "English") %>%
count("Primary Language" = primary_language, sort = T) %>%
filter(n >= 8) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns()
kable(table, caption = "Students' Primary Language (Ten most spoken)", col.names = c("Primary Language", "Percent (Total)")) %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T)| Primary Language | Percent (Total) |
|---|---|
| Somali | 25.2% (126) |
| Spanish | 21.0% (105) |
| Vietnamese | 18.0% (90) |
| Cantonese | 14.8% (74) |
| Oromo (Ethiopia) | 6.0% (30) |
| Amharic | 4.2% (21) |
| Toishanese | 4.2% (21) |
| Tigrinya (Tigrigna) | 2.6% (13) |
| Mandarin | 2.4% (12) |
| Tagalog | 1.6% (8) |
data %>%
filter(primary_language != "English") %>%
ggplot(aes(x= reorder(primary_language, primary_language,function(x)length(x)))) + geom_bar(position = "dodge", fill = "#AA0000") + scale_fill_manual(values=c("black","#AA0000", name="Group")) + coord_flip() + labs(x= "Primary Language") + scale_y_continuous(breaks = c(0, 25, 50, 75, 100, 125, 150))# Number of Bilingual Student
table <- data %>%
summarise(
"n" = sum(bilingual),
"Percent Bilingual" = round((n/n())*100,2))
kable(table, caption = "Bilingual Students", col.names = c("Total", "Percent"), full_width = F) %>% kable_styling(full_width = F, bootstrap_options = "responsive", position = "left", fixed_thead = T)| Total | Percent |
|---|---|
| 295 | 33.5 |
waffle(bilingual, rows=5, size=0.5,
colors = c("#AA0000", "black"),
title="Percent of Bilingual Students",
xlab="1 square = 1 Percent")# Number of Students Experiencing Homelessness
table <- data %>%
summarise(
"n" = sum(as.numeric(homeless)),
"Percent Homeless" = round((n/n())*100,2),
)
kable(table, caption = "Students Experiencing Homelessness", col.names = c("Total", "Percent"), full_width = F) %>% kable_styling(full_width = F, bootstrap_options = "responsive", position = "left", fixed_thead = T)| Total | Percent |
|---|---|
| 60 | 6.81 |
waffle(homeless, rows=5, size=0.5,
colors = c("#AA0000", "black"),
title="Percent of Students Experiencing Homelessness",
xlab="1 square = 1 Percent")SUYI Absenteeism
table <- data %>%
summarise(
"Min" = min(days_absent),
"Median" = median(days_absent),
"Mean" = mean(days_absent),
"Max" = max(days_absent))
kable(table, caption = "School Absenteeism", full_width = F) %>% kable_styling(full_width = F, bootstrap_options = "responsive", position = "left", fixed_thead = T)| Min | Median | Mean | Max |
|---|---|---|---|
| 0 | 7 | 12.4 | 118 |
data %>%
ggplot(aes(reorder(school, days_absent, FUN = median), days_absent)) + geom_boxplot(fill = "grey90") + coord_flip() + labs(x = "School", y = "Days Absent")#Elementary Attendance
table <- elem %>%
group_by("School" = school) %>%
summarise(
"Min" = min(days_absent),
"Median" = median(days_absent),
"Mean" = mean(days_absent),
"Max" = max(days_absent))%>%
arrange(desc(Median))
kable(table, caption = "Elementary School Absenteeism") %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T)| School | Min | Median | Mean | Max |
|---|---|---|---|---|
| King K-8 School | 1 | 8.5 | 12.78 | 67.5 |
| 21st Century K-8 School | 0 | 8.0 | 8.93 | 23.0 |
| Monroe Elementary | 0 | 7.0 | 10.13 | 68.0 |
| Kennedy Elementary | 0 | 6.0 | 7.88 | 29.5 |
| Lincoln Elementary | 0 | 6.0 | 8.89 | 38.0 |
| Spring Crest Elementary | 0 | 6.0 | 10.24 | 57.0 |
| Franklin Elementary | 0 | 5.0 | 5.42 | 10.0 |
| Valley Elementary | 0 | 4.0 | 6.51 | 36.0 |
elem %>%
ggplot(aes(reorder(school, days_absent, FUN = median), days_absent)) + geom_boxplot(fill = "#4F95DB") + coord_flip() + labs(x = "School", y = "Days Absent")#Middle School Attendance
table <- middle %>%
group_by("School" = school) %>%
summarise(
"Min" = min(days_absent),
"Median" = median(days_absent),
"Mean" = mean(days_absent),
"Max" = max(days_absent))%>%
arrange(desc(Median))
kable(table, caption = "Middle School Absenteeism") %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T)| School | Min | Median | Mean | Max |
|---|---|---|---|---|
| New Future Alternative | 15.0 | 23.0 | 21.67 | 27.0 |
| Union Middle School | 0.0 | 10.0 | 20.39 | 54.5 |
| King K-8 School | 0.0 | 8.0 | 10.57 | 30.5 |
| Sound View Middle School | 0.5 | 6.5 | 15.46 | 66.0 |
| 21st Century K-8 School | 2.0 | 6.0 | 9.65 | 26.0 |
| Horizon Middle School | 0.0 | 5.5 | 8.83 | 59.5 |
middle %>%
ggplot(aes(reorder(school, days_absent, FUN = median), days_absent)) + geom_boxplot(fill = "#DBA14F") + coord_flip() + labs(x = "School", y = "Days Absent")#High School Attendance
table <- hs %>%
group_by("School" = school) %>%
summarise(
"Min" = min(days_absent),
"Median" = median(days_absent),
"Mean" = mean(days_absent),
"Max" = max(days_absent)) %>%
arrange(desc(Median))
kable(table, caption = "High School Absenteeism") %>% kable_styling(full_width = T, bootstrap_options = c("striped", "responsive"), position = "left", fixed_thead = T)| School | Min | Median | Mean | Max |
|---|---|---|---|---|
| New Future Alternative | 0.0 | 48.5 | 47.8 | 117.5 |
| Cascade High School | 5.5 | 36.5 | 38.6 | 103.5 |
| Olympic High School | 0.0 | 20.5 | 30.7 | 94.5 |
| Johnson High School | 1.0 | 13.2 | 20.9 | 70.5 |
| Jackson High School | 0.0 | 7.0 | 14.4 | 85.5 |
hs %>%
ggplot(aes(reorder(school, days_absent, FUN = median), days_absent)) + geom_boxplot(fill = "#2ca25f") + coord_flip() + labs(x = "School", y = "Days Absent")MAP Growth Rasch UnIT (RIT) Scores
#Average Math and Reading RIT by Grade Level
df_long %>%
group_by(subject, semester, grade_level) %>%
summarise(y= mean(rit_score, na.rm = T)) %>%
ggplot(aes(semester, y, color = subject, group = subject)) + scale_color_manual(values=c("black", "#AA0000")) + labs(title= "Average Math and Reading RIT Score by Grade Level" ,x = "Semester", y = "Average Score") + geom_point() + geom_line() + facet_wrap(~grade_level)#Average RIT Score by Sex
df_long %>%
group_by(subject, semester, sex) %>%
summarise(y= mean(rit_score, na.rm = T)) %>%
ggplot(aes(semester, y, color = subject, group = subject)) + scale_color_manual(values=c("black", "#AA0000")) + labs(title= "Average Math and Reading RIT Score by Grade Level" ,x = "Semester", y = "Average Score") + geom_point() + geom_line() + facet_wrap(~sex)#Average RIT Score by Race
df_long %>%
group_by(subject, semester, race) %>%
summarise(y= mean(rit_score, na.rm = T)) %>%
ggplot(aes(semester, y, color = subject, group = subject)) + scale_color_manual(values=c("black", "#AA0000")) + labs(title= "Average Math and Reading RIT Score by Race", caption = "n < 5 for Japanese, Alaska Native, Asian Indian, Korean, Samoan, and Cambodian", x = "Semester", y = "Average Score") + geom_point() + geom_line() + facet_wrap(~race)#RIT Math Growth
elem %>%
filter(!is.na(math_growth)) %>%
ggplot(aes(reorder(school, math_growth, FUN = median), math_growth, fill = school)) + geom_boxplot() + labs(x = "School", y = "Math Growth") + coord_flip() + scale_fill_brewer(palette="RdBu")RIT Growth Plots
Reading
Elementary Schools
# Elementary Reading Dumbbell Plot
ggplot(elem_mean_reading, aes(x=mean_fall_reading, xend=mean_spring_reading, y=school)) + geom_segment(aes(x=150,
xend=250,
y=school,
yend=school),
color="grey90", size=1)+
geom_dumbbell(color="black",
size_x=3.5,
size_xend = 3.5,
colour_x="black",
colour_xend = "#AA0000")+
labs(x="Reading Score", y="School",
title="Elementary Fall to Spring Average RIT Reading Scores",
caption="2014 School year") +
geom_text(data=filter(elem_mean_reading, school == "Valley Elementary"), aes(x=mean_fall_reading, y=school, label="Fall"),
color="black", size=2.75, vjust=-2.5, position = position_dodge(width = 2)) +
geom_text(data=filter(elem_mean_reading, school == "Valley Elementary"), color="#AA0000", size=2.75, vjust=-2.5,
aes(x=mean_spring_reading, y=school, label="Spring"), position = position_dodge(width = 2)) +
geom_text(data=elem_mean_reading, aes(x=mean_fall_reading, y=school, label=round(mean_fall_reading,2)),
color="black", size=2.75, vjust=2.5, position = position_dodge(width = 2)) +
geom_text(data=elem_mean_reading, color="black", size=2.75, vjust=2.5,
aes(x=mean_spring_reading, y=school, label=round(mean_spring_reading,2)), position = position_dodge(width = 2)) +
geom_rect(data=elem_mean_reading, aes(xmin=230, xmax=250, ymin=-Inf, ymax=Inf), fill="grey90") +
geom_text(data=elem_mean_reading, aes(label=paste0(round(mean_reading_diff,2)), y=school, x=240), fontface="bold", size=3) +
geom_text(data= filter(elem_mean_reading, school == "Valley Elementary"),
aes(x=240, y=school, label="Growth Index"),
color="black", size=3.1, vjust=-3, fontface="bold") + scale_x_continuous(expand=c(0,0), limits=c(150, 250)) + scale_y_discrete(expand=c(0.2,0))Middle Schools
#Middle Reading Dumbbell Plot
ggplot(middle_mean_reading, aes(x=mean_fall_reading, xend=mean_spring_reading, y=school)) + geom_segment(aes(x=150,
xend=250,
y=school,
yend=school),
color="grey90", size=1)+
geom_dumbbell(color="black",
size_x=3.5,
size_xend = 3.5,
colour_x="black",
colour_xend = "#AA0000")+
labs(x="Reading Score", y="School",
title="Middle School Fall to Spring Average RIT Reading Scores",
caption="2014 School year") +
geom_text(data=filter(middle_mean_reading, school == "Sound View Middle School"), aes(x=mean_fall_reading, y=school, label="Fall"),
color="black", size=2.75, vjust=-2.5, position = position_dodge(width = .5)) +
geom_text(data=filter(middle_mean_reading, school == "Sound View Middle School"), color="#AA0000", size=2.75, vjust=-2.5,
aes(x=mean_spring_reading, y=school, label="Spring"), position = position_dodge(width = 2)) +
geom_text_repel(data=middle_mean_reading, aes(x=mean_fall_reading, y=school, label=round(mean_fall_reading,2)),
color="black", size=2.75, vjust=2.5, position = position_dodge(width = .5)) +
geom_text_repel(data=middle_mean_reading, color="black", size=2.75, vjust=-1,
aes(x=mean_spring_reading, y=school, label=round(mean_spring_reading,2))) +
geom_rect(data=middle_mean_reading, aes(xmin=230, xmax=250, ymin=-Inf, ymax=Inf), fill="grey90") +
geom_text(data=middle_mean_reading, aes(label=paste0(round(mean_reading_diff,2)), y=school, x=240), fontface="bold", size=3) +
geom_text(data= filter(middle_mean_reading, school == "Sound View Middle School"),
aes(x=240, y=school, label="Growth Index"),
color="black", size=3.1, vjust=-3, fontface="bold") + scale_x_continuous(expand=c(0,0), limits=c(150, 250)) + scale_y_discrete(expand=c(0.2,0))High Schools
#High School Reading Dumbbell Plot
ggplot(hs_mean_reading, aes(x=mean_fall_reading, xend=mean_spring_reading, y=school)) + geom_segment(aes(x=150,
xend=250,
y=school,
yend=school),
color="grey90", size=1)+
geom_dumbbell(color="black",
size_x=3.5,
size_xend = 3.5,
colour_x="black",
colour_xend = "#AA0000")+
labs(x="Reading Score", y="School",
title="High School Fall to Spring Average RIT Reading Scores",
caption="2014 School year") +
geom_text(data=filter(hs_mean_reading, school == "Olympic High School"), aes(x=mean_fall_reading, y=school, label="Fall"),
color="black", size=2.75, vjust=-2.5, position = position_dodge(width = 2)) +
geom_text(data=filter(hs_mean_reading, school == "Olympic High School"), color="#AA0000", size=2.75, vjust=-2.5,
aes(x=mean_spring_reading, y=school, label="Spring"), position = position_dodge(width = 2)) +
geom_text(data=hs_mean_reading, aes(x=mean_fall_reading, y=school, label=round(mean_fall_reading,2)),
color="black", size=2.75, vjust=2.5, position = position_dodge(width=.5)) +
geom_text(data=hs_mean_reading, color="black", size=2.75, vjust=-1,
aes(x=mean_spring_reading, y=school, label=round(mean_spring_reading,2)), position = position_dodge(width=1)) +
geom_rect(data=hs_mean_reading, aes(xmin=230, xmax=250, ymin=-Inf, ymax=Inf), fill="grey90") +
geom_text(data=hs_mean_reading, aes(label=paste0(round(mean_reading_diff,2)), y=school, x=240), fontface="bold", size=3) +
geom_text(data= filter(hs_mean_reading, school == "Olympic High School"),
aes(x=240, y=school, label="Growth Index"),
color="black", size=3.1, vjust=-3, fontface="bold") + scale_x_continuous(expand=c(0,0), limits=c(150, 250)) + scale_y_discrete(expand=c(0.2,0))Math
Elementary Schools
# Elementary Math Dumbbell Plot
ggplot(elem_mean_math, aes(x=mean_fall_math, xend=mean_spring_math, y=school)) + geom_segment(aes(x=150,
xend=250,
y=school,
yend=school),
color="grey90", size=1)+
geom_dumbbell(color="black",
size_x=3.5,
size_xend = 3.5,
colour_x="black",
colour_xend = "#AA0000")+
labs(x="Math Score", y="School",
title="Elementary Fall to Spring Average RIT Math Scores",
caption="2014 School year") +
geom_text(data=filter(elem_mean_math, school == "Lincoln Elementary"), aes(x=mean_fall_math, y=school, label="Fall"),
color="black", size=2.75, vjust=-2.5, position = position_dodge(width = 2)) +
geom_text(data=filter(elem_mean_math, school == "Lincoln Elementary"), color="#AA0000", size=2.75, vjust=-2.5,
aes(x=mean_spring_math, y=school, label="Spring"), position = position_dodge(width = 2)) +
geom_text(data=elem_mean_math, aes(x=mean_fall_math, y=school, label=round(mean_fall_math,2)),
color="black", size=2.75, vjust=2.5, position = position_dodge(width = 2)) +
geom_text(data=elem_mean_math, color="black", size=2.75, vjust=2.5,
aes(x=mean_spring_math, y=school, label=round(mean_spring_math,2)), position = position_dodge(width = 2)) +
geom_rect(data=elem_mean_math, aes(xmin=230, xmax=250, ymin=-Inf, ymax=Inf), fill="grey90") +
geom_text(data=elem_mean_math, aes(label=paste0(round(mean_math_diff,2)), y=school, x=240), fontface="bold", size=3) +
geom_text(data= filter(elem_mean_math, school == "Lincoln Elementary"),
aes(x=240, y=school, label="Growth Index"),
color="black", size=3.1, vjust=-3, fontface="bold") + scale_x_continuous(expand=c(0,0), limits=c(150, 250)) + scale_y_discrete(expand=c(0.2,0))Middle Schools
#Middle Math Dumbbell Plot
ggplot(middle_mean_math, aes(x=mean_fall_math, xend=mean_spring_math, y=school)) + geom_segment(aes(x=175,
xend=275,
y=school,
yend=school),
color="grey90", size=1)+
geom_dumbbell(color="black",
size_x=3.5,
size_xend = 3.5,
colour_x="black",
colour_xend = "#AA0000")+
labs(x="Math Score", y="School",
title="Middle School Fall to Spring Average RIT Math Scores",
caption="2014 School year") +
geom_text(data=filter(middle_mean_math, school == "Union Middle School"), aes(x=mean_fall_math, y=school, label="Fall"),
color="black", size=2.75, vjust=-2.5, position = position_dodge(width = 2)) +
geom_text(data=filter(middle_mean_math, school == "Union Middle School"), color="#AA0000", size=2.75, vjust=-2.5,
aes(x=mean_spring_math, y=school, label="Spring"), position = position_dodge(width = 2)) +
geom_text_repel(data=middle_mean_math, aes(x=mean_fall_math, y=school, label=round(mean_fall_math,2)),
color="black", size=2.75, vjust=2.5, position = position_dodge(width = 2)) +
geom_text_repel(data=middle_mean_math, color="black", size=2.75, vjust=-1,
aes(x=mean_spring_math, y=school, label=round(mean_spring_math,2)), position = position_dodge(width = 2)) +
geom_rect(data=middle_mean_math, aes(xmin=250, xmax=275, ymin=-Inf, ymax=Inf), fill="grey90") +
geom_text(data=middle_mean_math, aes(label=paste0(round(mean_math_diff,2)), y=school, x=260), fontface="bold", size=3) +
geom_text(data= filter(middle_mean_math, school == "Union Middle School"),
aes(x=260, y=school, label="Growth Index"),
color="black", size=3.1, vjust=-3, fontface="bold") + scale_x_continuous(expand=c(0,0), limits=c(175, 275)) + scale_y_discrete(expand=c(0.2,0))High Schools
#High School Math Dumbbell Plot
ggplot(hs_mean_math, aes(x=mean_fall_math, xend=mean_spring_math, y=school)) + geom_segment(aes(x=175,
xend=275,
y=school,
yend=school),
color="grey90", size=1)+
geom_dumbbell(color="black",
size_x=3.5,
size_xend = 3.5,
colour_x="black",
colour_xend = "#AA0000")+
labs(x="Math Score", y="School",
title="High School Fall to Spring Average RIT Math Scores",
caption="2014 School year") +
geom_text(data=filter(hs_mean_math, school == "Olympic High School"), aes(x=mean_fall_math, y=school, label="Fall"),
color="black", size=2.75, vjust=-2.5, position = position_dodge(width = 2)) +
geom_text(data=filter(hs_mean_math, school == "Olympic High School"), color="#AA0000", size=2.75, vjust=-2.5,
aes(x=mean_spring_math, y=school, label="Spring"), position = position_dodge(width = 2)) +
geom_text(data=hs_mean_math, aes(x=mean_fall_math, y=school, label=round(mean_fall_math,2)),
color="black", size=2.75, vjust=2.5, position = position_dodge(width=.5)) +
geom_text(data=hs_mean_math, color="black", size=2.75, vjust=-1,
aes(x=mean_spring_math, y=school, label=round(mean_spring_math,2)), position = position_dodge(width=1)) +
geom_rect(data=hs_mean_math, aes(xmin=250, xmax=275, ymin=-Inf, ymax=Inf), fill="grey90") +
geom_text(data=hs_mean_math, aes(label=paste0(round(mean_math_diff,2)), y=school, x=260), fontface="bold", size=3) +
geom_text(data= filter(hs_mean_math, school == "Olympic High School"),
aes(x=260, y=school, label="Growth Index"),
color="black", size=3.1, vjust=-3, fontface="bold") + scale_x_continuous(expand=c(0,0), limits=c(175, 275)) + scale_y_discrete(expand=c(0.2,0))