geom_point: mean test score by subgroup and test

Mean percentage of students that scored at or above proficient in math and reading

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 proficient test scores in math and reading differ among states/regions?

Plot

Prior version

Code

#Plot showing mean test score by subgroup and test

df_pivot %>%
  ggplot(aes(x = mean_pct,
             y = fct_reorder(STNAM.y, mean_pct),
             fill = mean_pct,
             color = test)) +
  geom_point(size = .9,
             alpha = .7) +
  facet_wrap(~Subgroup) +
  guides(fill = "none") +
  scale_color_discrete(l = 45,
                       name = "Test",
                       labels = c("Math", "Reading")) +
  labs(title = 'Mean percentage of students that scored at or above proficient',
       caption = 'In Math and Reading',
       x = 'Mean percent proficient',
       y = 'State') +
  theme_minimal()