walkerke / tidycensus

Load US Census boundary and attribute data as 'tidyverse' and 'sf'-ready data frames in R
https://walker-data.com/tidycensus
Other
639 stars 99 forks source link

Missing UR20 values #433

Closed kerencrum closed 2 years ago

kerencrum commented 2 years ago

When I download the 2020 decennial geo variables the UR20 column is blank. This data is available when I download the block data directly from the TigerLines shapefiles, though. Is there a way to get the Urban/Rural data?

Tbl <- get_decennial(geography = "block", table = "H1",cache_table = TRUE, state = "MT", year = 2020, geometry = TRUE, keep_geo_vars = TRUE, output = "wide")

walkerke commented 2 years ago

I just downloaded the block shapefile directly from the Census website and opened it in QGIS; all I see are NULLs for that column. What do you see?

image

kerencrum commented 2 years ago

Thanks for sharing. I wonder if this is because I'm downloading from the 2021 TigerLine Shapefile but I get this when I open it up in ArcPro: UR20

walkerke commented 2 years ago

Looks like it's just in the 2021 file then, and not in the 2020 file which get_decennial() will use. You can get the 2021 blocks with the tigris package with the command tigris::blocks(state = "MT", year = 2021). tidycensus won't support the 2021 blocks but you can grab them separately from tigris then join to your demographic data.

kerencrum commented 2 years ago

Good to know. Thanks for the suggestion!