geom_jitter: mean test score by students’ subgroup and test(math or reading) by state

Plot showing mean test score by subgroup and test by state

Rebecca Gordon
2022-03-09

Rebecca

Research Question:

How do high school students’ subgroup makeup (i.e., Race/ethnicity, Male vs. Female, economically disadvantaged, Limited English, Migrant status, Disability status, and Homelessness) and mean test scores in math and reading differ among states/regions?

Plot

Prior version

Code

df_pivot %>%   
  ggplot(aes(x = mean_pct, 
             y = fct_reorder(Subgroup, mean_pct))) +
  geom_jitter(aes(color = test),
              size = .9,
              alpha = .8) +
  facet_wrap(~STNAM.y) +
  scale_color_discrete(l = 70,
                       name = "Test",
                       labels = c("Math", "Reading")) +
  labs(title = 'Mean percentage of students that scored at or above proficient in Math and Reading',
       x = 'Mean percent proficient',
       y = 'Group') +
  theme_minimal()