Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(tigris)
- library(tidycensus)
- library(tidyverse)
- sd_income <- tidyverse::get_acs(state = "TN", geography = "school district (unified)", variables = "B19013_001") #median hh income
- sd_geo <- tigris::school_districts(state = "TN", type = "unified", class="sf")
- sd_joined <- dplyr::left_join(sd_geo, sd_income, by = "GEOID")
- ggplot(sd_joined, aes(fill = estimate)) +
- geom_sf() +
- coord_sf(datum = NA) +
- theme_minimal() +
- scale_fill_distiller(palette = "Blues", direction = 1) +
- labs(title = "School Districts",
- fill = "Income",
- caption = "data: US Census Burea ACS")
Add Comment
Please, Sign In to add comment