|
Re: How to use API to import data to R/Stata [message #23050 is a reply to message #23049] |
Thu, 01 July 2021 14:43 |
Trevor-DHS
Messages: 803 Registered: January 2013
|
Senior Member |
|
|
The API is not designed for loading datasets into R or Stata. The API is used to provide aggregated indicator data to tools such as STATcompiler or the DHS mobile app. It can also be used to download aggregated data (not the micro data) in Stata or R, or other tools. You can find out about the API at http://api.dhsprogram.com/#/index.html. There are some code samples on the API site for using the API in R or Stata.
However, there is a tool called rdhs developed by Oliver Watson and Jeff Eaton that does permit downloading and using DHS datasets directly in R, and this makes use of the API to find information about the datasets and about indicators. This also includes a number of vignettes about how to use rdhs, including an introduction vignette.
|
|
|