I'm trying to upload data for "county subdivision" as part of the geography options in tidycensus' get_acs() function. I know there are several geography options, which Kyle Walker has published on his page. https://walkerke.github.io/tidycensus/articles/basic-usage.html#geography-in-tidycensus
And while it works fine for state and county level, because you would just put county = "Monmouth". But I can't seem to get the syntax to work at the city subdivision level for a city within Monmouth county. I've looked for other tidycensus scripts, but haven't found any using geographies below County level.
Any suggestions?
library(tidycensus)
library(tidyverse)
library(sf)
census_api_key("YOUR API KEY GOES HERE")
vars <- c(English = "C16002_002",
Spanish = "C16002_003")
language <- get_acs(geography = "county subdivision",
state = "NJ",
county = "Monmouth",
city = "Red Bank",
table = "C16001")
rb_language <- get_acs(geography = "tract",
variables = vars,
state = "NJ",
county = "Monmouth",
city = "Red Bank"
geometry = TRUE,
summary_var = "C16002_001") %>%
st_transform(26918)