Skip to content

Instantly share code, notes, and snippets.

@walkerke
Created September 1, 2022 20:27
Show Gist options
  • Save walkerke/e61d9592102adf545e3d52a03e351612 to your computer and use it in GitHub Desktop.
Save walkerke/e61d9592102adf545e3d52a03e351612 to your computer and use it in GitHub Desktop.
pop <- tidycensus::get_acs(
geography = "tract",
variables = "B01001_001",
state = "CA",
county = "Alameda",
year = 2020,
geometry = TRUE
)
oakland <- tigris::places("CA", cb = TRUE, year = 2020) |>
dplyr::filter(NAME == "Oakland")
oakland_pop <- sf::st_filter(pop, oakland, .predicate = sf::st_within)
mapview::mapview(oakland_pop, zcol = "estimate")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment