PUMS Data

I am trying to download IPUMS data for all states in the U.S. using the R function get_pums. However, I receive the following error message when running the code. 

Error: Your API call has errors.  The API message returned is There was an error while running your query.  We've logged the error and we'll correct it ASAP.  Sorry for the inconvenience..

This only occurs when I request all states either manually or with the "all" command for states. I tried the code below with each state name as well, but I receive the same error. The code works for individual states. Has anyone else run into this problem? 

all_pums <- get_pums(
variables = c("PUMA", "SEX", "AGEP", "SCHL", "FFSP", "ST",
"AGEP", "CIT", "COW", "DDRS", "DEAR", "DEYE", "DOUT",
"DPHY", "DRAT", "DRATX", "DREM", "LANX", "MAR", "SCH", "SCHL", "ESR",
"DIS", "ESP", "NATIVITY", "NOP", "OC", "POWPUMA", "RAC1P", "RACAIAN",
"RACASN", "RACBLK", "RACNH", "RACNUM", "RACWHT", "RACPI", "RACSOR"),
state = "all",
survey = "acs5", year = 2019)

Parents
  • We see this at times with large data requests from the API. I would recommend requesting one state at a time and iterating through all states (ideally with some error handling in place). Alternatively, if you really need all states PUMS data, you could consider downloading it directly from the Census bureau or from IPUMS, rather than using the API. 

  • Thank you for your response, Matt. I reached out to a connection of mine who has worked with census data and they suggested the same thing. I'll just run the code for each state and append the data frames. Thanks again.

Reply Children
No Data