Breakdown of types of computers in household by state AND Age Demographic

I have found the data set for types of computers in household by state, see here:  But cannot segment by age groups current ACS has the following 3: "Under 18 years" ,"18 to 64 years", "65 years and over". Can this be queried via the API or by other means?

  • John

    You can query for other age ranges using the PUMS data.  However, this will depend on the geographic area of interest.  PUMAs cover areas of approximately 100,000 residents.  PUMS data is not available below that level.  There is a PUMS tool available through  An alternative is to use the IPUMS USA site.

    Cliff Cook

  • Thanks Cliff,

    I've queried the PUMS data set and still cannot obtain this result, this should be a straight forward pull though for someone who is familiar with the data set.

  • The variables you'll need from PUMS to construct these estimates are AGEP, COMPOTHX, LAPTOP, SMARTPHONE, and TABLET. Once you pull the microdata, you'll need to create the age groups you are interested in and calculate the estimated you are looking for. Some of the places you can get this data from are, the Census FTP, IPUMS, Census API. Wherever you download it, you'll need t process it and calculate estimates using the provided weights.

    If you are an R user, below is some example code that should get you most of the way there. Here is some more info on getting PUMS data using tidycensus


    # variables relating to computer ownership
    pums_vars <- c("AGEP", "LAPTOP", "SMARTPHONE", "TABLET", "COMPOTHX")

    # get pums data
    # for this example just use vermont for small download
    vt_pums <- get_pums(
      variables = pums_vars,
      state = "VT",
      year = 2019,
      survey = "acs1",
      show_call = TRUE

    # remove non-household persons
    # create categorical age variable
    # recode computer vars into yes/no
    vt_pums_clean <- vt_pums %>%
      filter(COMPOTHX != "b") %>%   # remove non-household persons
        age_cat = case_when(
          AGEP <= 17 ~ "Under 18",
          between(AGEP, 18, 64) ~ "18 to 64",
          AGEP >= 65 ~ "65 and over"
          ~ if_else(.x == "1", "Yes", "No"))

    # reshape data from wide to long
    # and count age category and computer vars using person weights
    vt_pums_clean %>%
      select(PWGTP, COMPOTHX:TABLET, age_cat) %>%
      pivot_longer(cols = c(COMPOTHX:TABLET)) %>%
      count(age_cat, name, value, wt = PWGTP)

  • Note that if you want to have appropriate standard errors, you need to invoke `library(survey)` or `library(srvyr)` and use replicate weights.