Scatterplot of Midwest County Data

Author

Kyra Vargas

This scatterplot shows the relationship between college education and poverty in Midwest counties.

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.6
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.1     ✔ tibble    3.3.0
✔ lubridate 1.9.4     ✔ tidyr     1.3.2
✔ purrr     1.2.0     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggplot2)

ggplot(data = midwest, aes(x = percollege, y = percbelowpoverty)) +
  geom_point() +
  labs(
   x = "Percent college educated",
    y = "Percent below Poverty Line",
    title = "Education vs Poverty in Midwest Counties"
  ) +
  theme(plot.title = element_text(hjust = 0.5)) ## just to have the title centered