-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.qmd
241 lines (210 loc) · 6.55 KB
/
index.qmd
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
---
title: "School Corporation Opportunity Score Dashboard for Indiana"
author:
- name: Jeremy Price
url: https://www.jeremyfprice.info/
affiliation: CEISL / IU School of Education-Indianapolis
affiliation_url: https://education.iupui.edu/
orcid: 0000-0002-6506-3526
- name: Akaash Arora
affiliation: CEISL / IU School of Education-Indianapolis
affiliation_url: https://education.iupui.edu/
- name: Maxim Bulanov
affiliation: CEISL / IU School of Education-Indianapolis
affiliation_url: https://education.iupui.edu/
- name: AJ Knoors
affiliation: CEISL / IU School of Education-Indianapolis
affiliation_url: https://education.iupui.edu/
license: "CC BY-SA"
toc: true
citation:
type: report
issued: 2023
url: https://github.com/jeremyfprice/SCOscore-dashboard
doi: 10.17605/OSF.IO/CHJ38
repo-url: https://github.com/jeremyfprice/SCOscore-dashboard
mainfont: spectral
sansfont: rubik
monofont: "JetBrains Mono"
format: html
highlight-style: a11y
code-overflow: wrap
google-scholar: true
---
```{r, include=FALSE}
knitr::opts_chunk$set(
comment = "#>",
echo = FALSE,
message = FALSE,
warning = FALSE
)
```
```{r load-libraries}
library(readr)
library(tidyr)
library(dplyr)
library(rio)
library(DT)
library(ggplot2)
library(ggpubr)
library(plotly)
library(ggbeeswarm)
library(edbuildmapr)
library(maps)
library(mapdata)
library(ggmap)
library(ggrepel)
library(sf)
library(showtext)
ucl_palette <- c(
"City large" = "#990000",
"City midsize" = "#F23A3F",
"City small" = "#FF636A",
"Suburb large" = "#FFAA00",
"Suburb midsize" = "#FFD563",
"Suburb small" = "#FFE694",
"Town fringe" = "#056E41",
"Town distant" = "#63B363",
"Town remote" = "#A7D094",
"Rural fringe" = "#006298",
"Rural distant" = "#63B1D3",
"Rural remote" = "#94D2E7"
)
```
```{r load-fonts, echo = FALSE, include=FALSE}
font_add_google("Rubik", "rubik", regular.wt = 700)
font_add_google("JetBrains Mono", "jetbrains", regular.wt = 700)
font_add_google("Spectral", "spectral", regular.wt = 700)
```
```{r read-data}
SCO_frame <- import("https://osf.io/download/dkjn6/", format = "csv") |>
na.omit()
SCO_frame$urm_pct <- round(SCO_frame$urm_pct, digits = 2)
SCO_frame$frl_pct = round(SCO_frame$frl_pct, digits = 2)
SCO_frame$academic = round(SCO_frame$academic, digits = 2)
SCO_frame$scoScore = round(SCO_frame$scoScore, digits = 2)
```
## Introduction
The School Corporation Opportunity Score (SCOscore) is a measure of potentiality for learners in a
school community. It is a composite score that combines multiple factors, particularly structural
factors such as race and SES, as well as performance factors such as test scores and graduation
pathway completion rates, to provide a more holistic view of school corporations.
For more information, see the [documentation](https://ceisl-stem.github.io/scoscore/).
```{r prep-map, message = FALSE, warning=FALSE, output = FALSE}
states <- sf::st_as_sf(map("state", region = "indiana", plot = FALSE, fill = TRUE))
in_sc_shapes <- sd_shapepull("2019", with_data = TRUE) |>
filter(State == "Indiana") |>
select(leaid = GEOID, geometry) |>
mutate(leaid = as.numeric(leaid))
SCO_frame <- SCO_frame |>
right_join(in_sc_shapes)
school_corp_map <- st_as_sf(SCO_frame)
sco_map <- ggplot(data = states) +
geom_sf(data = states, fill = "#eeeeee") +
geom_sf(data = school_corp_map, color = "#243142", aes(
label = lea_name,
fill = scoScore)) +
scale_fill_steps2(
name = "SCOscore",
low = "#FFF4C6",
high = "#990000",
mid = "#FFAA00",
midpoint = 1.1,
breaks = c(0, 0.6, 0.8, 1, 1.2, 1.4)
) +
coord_sf(xlim = c(-88.5, -84.5), ylim = c(37.5, 42), expand = FALSE) +
theme_minimal() +
theme(panel.grid.major = element_blank(),
axis.text = element_blank(),
axis.title = element_blank())
```
## Table of School Corporations
The following is a table with all of the school corporations in Indiana. You can
sort and search to identify trends or a specific school corporation.
```{r}
SCO_display_frame <- SCO_frame |>
select(lea_name, urban_centric_locale, enrollment, urm_pct, frl_pct, academic, scoScore) |>
arrange(desc(scoScore), desc(enrollment), lea_name) |>
na.omit()
# select(-enrollment)
datatable(
SCO_display_frame,
rownames = FALSE,
colnames = c(
"Corporation",
"Locale",
"Enrollment",
"%URM",
"%FRL",
"AcScore",
"SCOscore"
),
options = list(
pageLength = 5)
) |>
formatStyle(columns = c(2), fontSize = "90%")
```
## Map of Indiana School Corporations
The following is a map of the Indiana school corporations. You may tap or hover over
a school corporation to see the SCOscore for the corporation.
```{r display-map, results = "asis"}
ggplotly(sco_map)
```
## SCOscores by NCES Urban-Centric Locale Category
The following is a plot of the SCOscores for Indiana school corporations by
NCES defined urban-centric locale categories. You may hover or click on any point
to see the data.
```{r plot-beeswarm, results = "asis"}
SCO_frame$urban_centric_locale <- factor(
SCO_frame$urban_centric_locale,
levels = c(
"City large",
"City midsize",
"City small",
"Suburb large",
"Suburb midsize",
"Suburb small",
"Town fringe",
"Town distant",
"Town remote",
"Rural fringe",
"Rural distant",
"Rural remote"
)
)
urcl_swarm <- ggplot(
SCO_frame,
aes(
label = lea_name,
x = urban_centric_locale,
y = scoScore,
color = scoScore
)
) +
geom_beeswarm(cex = 1.5, corral = "wrap", shape = 18, size = 1) + #, method = "center"
annotate("segment", x = 0, xend = 12.5, y = 1, yend = 1, color = "#A7A9AB",
linetype = "dotted") +
scale_color_steps2(
low = "#FFF4C6",
high = "#990000",
mid = "#FFAA00",
midpoint = 1.1,
breaks = c(0, 0.6, 0.8, 1, 1.2, 1.4)
) +
ylim(0, 2) +
ylab("School Corporation Opportunity Score") +
xlab("NCES Urban-Centric Locale Category") +
theme_pubr() +
theme(
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1),
legend.position = "none"
)
ggplotly(urcl_swarm)
```
## Data Sources
Data for these calculations are drawn from the following sources:
* Indiana Department of Education's [Indiana Graduates Prepared to Succeed (GPS)](https://indianagps.doe.in.gov/)
* Urban Institute's [Education Data Explorer](https://educationdata.urban.org/data-explorer) via
the [educationdata](https://github.com/UrbanInstitute/education-data-package-r) R package
## Acknowledgments {.appendix}
This is a project of the Collaborative for Equitable and Inclusive STEM Learning (CEISL) at the IU School of Education-Indianapolis.