DP02_0153E Estimate!!COMPUTERS AND INTERNET USE!!Total households!!With a computer

Greetings,

Although the variable above shows up in load_variables (specifying the profile dataset) as well as online (Census Data API: /data/2020/acs/acs5/profile/variables), it does not come up with get_acs, even when using different variable specifications. 

Question: Is this not available at more granular geographic levels such as tracts?

net <- get_acs(geography = "tract",
variables = DP02_0154,
year = 2020,
output = "tidy"
)


#Error: object 'DP02_0154' not found

  • You may have already figured this out, but two things are causing your error. First, you need to have the variables contained within quotation marks. That's why it is saying "not found".

    Second, I believe that tract data is only available in tidycensus if sub-setted within a particular state or county. You cannot get all tracts for the entire nation in one pull.

    Here's some example code that should work for all census tracts in Indiana (for example) with the variable you have requested.

    net <- get_acs(geography = "tract",
    state = "IN",
    variables = "DP02_0154",
    year = 2020,
    output = "tidy"
    )

    This page has a table that shows you how you need to subset certain geographies (like tracts) in tidycensus: Basic usage of tidycensus • tidycensus (walker-data.com)

  • Yes, indeed, thank you!