PUMS API

Does anyone know how to download the PUMS replicate weights (all 80 of them) using the API ?  When I try to list all 80 variable in the API call I get the ERROR: "error: 'get' is limited to 50 variables."  Is there a way to download the 80 weights along with other variables without having to have to break everything up into groups of fewer than 50 variables ?

Thanks Dave Dorer

  • I haven't done it through the API directly, but if you use R you can use the the tidycensus package to make the API call / download the data. It's worked well for me. 

  • In tidycensus, we handle this limit by making repeated calls to the API and combining the results if more than 50 variables (including weights) are requested. Here's the code that does that: github.com/.../pums.R

  • Dear Matt and Elizabith,

    I usually call the API from within my own R code.  I was hoping the the API would handle the replicate weights somehow as there are 80 of them so you have to make at least 2 calls.  Thanks for letting me know that tidycensus uses repeated calls.  I used the multiple calls solution and it sounds like that is the only way to do it.

  • why not download stuff from ipums.org? I understand using APIs for tables, but the rationale for straining the API to load the microdata is beyond me.

  • Deat Stas,

    Being a research "guy" I try to get as close to the original data source as possible. When I download something via the API using R I save the object in a file so I only download once. Ipums has a lot of great stuff but as of now I am only doing cross sectional analyses so I haven't needed some of the ipums features.