Hello,
I am trying to use the 2021 ACS 1-Year household-level data sets from https://www2.census.gov/programs-surveys/acs/data/pums/2021/1-Year/ within R. However, the majority of the columns are empty when I read in the csv files. Why is that so?
I have listed my example code below. Thank you for any help.
library(tidyverse)
# Household-level 2021 ACS - United States
# create a temporary file
temp <- tempfile()
# download the zip file containing the two csvs we will need to read into R
download.file("">www2.census.gov/.../csv_hus.zip", temp)
# read csv files
dat <- read_csv(unz(temp, "psam_husa.csv"))
dat2 <- read_csv(unz(temp, "psam_husb.csv"))
# delete the temporary file from your computer
unlink(temp)