Download "ahtus_00001.xml" file

hello,

I am a new user trying to open my extract in R-Studio to explore the data I need for my PhD thesis. When I download the extract I get a .zip document containing only one “.dat” file, but with no “ahtus_00001.xml” file. The latter is needed to open the former according to the instructions provided by IPUMS webpage, but I cannot make it.
Please, can someone indicate where is located the .XML file? Or any further guidance to start working with the .dat file in R?

Thanks in advanced.
Andrea

The .xml DDI codebook is downloaded separately from the the compressed data file. To obtain the .xml file from the website, right-click the DDI link in the Codebook column from your My Data page, and select Save Link As… (see below).

Note that some browsers may display different text, but there should be an option to download the DDI file as .xml. (For instance, on Safari, select Download Linked File As….). You must save the file in .xml format, not .html format. You must also save the .xml file in the same folder as your .dat file. This vignette describes how to obtain IPUMS data using the website (as well as how to do so using our API).

You can then follow this vignette for instructions on how to input the data into R. To do so, you will need to download the ipumsr package. It can be installed using the following command:

install.packages('ipumsr')")

Hello Ivan.

Thank you so much. Your guide has been so helpful in downloading the DDI file and opening the dataset. I solved the problem.

Best,
Andrea.

1 Like