Package: rdhs 0.8.2

OJ Watson

rdhs: API Client and Dataset Management for the Demographic and Health Survey (DHS) Data

Provides a client for (1) querying the DHS API for survey indicators and metadata (<https://api.dhsprogram.com/#/index.html>), (2) identifying surveys and datasets for analysis, (3) downloading survey datasets from the DHS website, (4) loading datasets and associate metadata into R, and (5) extracting variables and combining datasets for pooled analysis.

Authors:OJ Watson [aut, cre], Jeff Eaton [aut], Lucy D'Agostino McGowan [rev], Duncan Gillespie [rev]

rdhs_0.8.2.tar.gz
rdhs_0.8.2.zip(r-4.5)rdhs_0.8.2.zip(r-4.4)rdhs_0.8.2.zip(r-4.3)
rdhs_0.8.2.tgz(r-4.4-any)rdhs_0.8.2.tgz(r-4.3-any)
rdhs_0.8.2.tar.gz(r-4.5-noble)rdhs_0.8.2.tar.gz(r-4.4-noble)
rdhs_0.8.2.tgz(r-4.4-emscripten)rdhs_0.8.2.tgz(r-4.3-emscripten)
rdhs.pdf |rdhs.html
rdhs/json (API)
NEWS

# Install 'rdhs' in R:
install.packages('rdhs', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ropensci/rdhs/issues

Datasets:

On CRAN:

datasetdhsdhs-apiextractpeer-reviewedsurvey-data

31 exports 34 stars 3.21 score 57 dependencies 3 dependents 1 mentions 882 downloads

Last updated 4 months agofrom:a40766914a (on main)

Exports:%>%as_factor.labelledclient_dhsdata_and_labelsdelabel_dfdhs_countriesdhs_datadhs_data_updatesdhs_datasetsdhs_geometrydhs_indicatorsdhs_infodhs_publicationsdhs_survey_characteristicsdhs_surveysdhs_tagsdhs_ui_updatesdownload_boundariesextract_dhsget_available_datasetsget_datasetsget_downloaded_datasetsget_rdhs_configget_variable_labelsrbind_labelledread_dhs_dtaread_zipdatasearch_variable_labelssearch_variablesset_rdhs_configupdate_rdhs_config

Dependencies:askpassbitbit64brioclassclassIntclicliprcpp11crayoncurlDBIdigeste1071fansiforcatsforeigngetPassgluehavenhmshttriotoolsjsonliteKernSmoothlifecyclemagrittrMASSmimeopensslpillarpkgconfigprettyunitsprogressproxyqdapRegexR6rappdirsRcppreadrrlangrstudioapis2sfstorrstringisystibbletidyselecttzdbunitsutf8vctrsvroomwithrwkxml2

Anemia prevalence: an rdhs example

Rendered fromanemia.Rmdusingknitr::rmarkdownon Jul 15 2024.

Last update: 2023-10-10
Started: 2018-04-11

Country Names and Codes

Rendered fromcountry_codes.Rmdusingknitr::rmarkdownon Jul 15 2024.

Last update: 2018-11-12
Started: 2018-11-12

Downloading Shape Files for DHS Surveys

Rendered fromboundaries.Rmdusingknitr::rmarkdownon Jul 15 2024.

Last update: 2023-10-10
Started: 2020-03-20

How to use rdhs?

Rendered fromintroduction.Rmdusingknitr::rmarkdownon Jul 15 2024.

Last update: 2023-10-10
Started: 2018-04-11

Interacting with geojson API returns

Rendered fromgeojson.Rmdusingknitr::rmarkdownon Jul 15 2024.

Last update: 2018-09-28
Started: 2018-09-28

Running test suite locally

Rendered fromtesting.Rmdusingknitr::rmarkdownon Jul 15 2024.

Last update: 2019-01-24
Started: 2018-07-27

Toolkit

Rendered fromtoolkit.Rmdusingknitr::rmarkdownon Jul 15 2024.

Last update: 2021-04-28
Started: 2018-04-18

rdhs client object and internal package design

Rendered fromclient.Rmdusingknitr::rmarkdownon Jul 15 2024.

Last update: 2023-10-10
Started: 2018-04-23

Readme and manuals

Help Manual

Help pageTopics
Archived dataset capable as_factoras_factor.labelled
DHS Website Authenticationauthenticate_dhs
Create a data frame of datasets that your log in can downloadavailable_datasets
Pull last cache dateclient_cache_date
Make a dhs clientclient_dhs
collapse API response listcollapse_api_responses
Create list of dataset and its variable namesdata_and_labels
convert labelled data frame to data frame of just charactersdelabel_df
API request of DHS Countriesdhs_countries
API request of DHS Indicator Datadhs_data
API request of DHS Data Updatesdhs_data_updates
API request of DHS Datasetsdhs_datasets
API request of DHS Geometrydhs_geometry
DHS GPS Data Formatdhs_gps_data_format
API request of DHS Indicatorsdhs_indicators
API request of DHS Infodhs_info
API request of DHS Publicationsdhs_publications
API request of DHS Survey Characteristicsdhs_survey_characteristics
API request of DHS Surveysdhs_surveys
API request of DHS Tagsdhs_tags
API request of DHS UI Updatesdhs_ui_updates
DHS Spatial Boundariesdownload_boundaries
Create a data frame of datasets that your log in can downloaddownload_datasets
Extract Dataextract_dhs
DHS survey questions extracted from datasetsextraction
reformat haven and labelled read ins to have no factors or labelsfactor_format
Returns what the dataset file ending should be for a given filenamefile_dataset_format
Get Available Datasetsget_available_datasets
Get Datasetsget_datasets
Get Downloaded Datasetsget_downloaded_datasets
Return variable labels from a datasetget_labels_from_dataset
Get rdhs configget_rdhs_config
Get Survey Variable Labelsget_variable_labels
Pull last DHS API database update timelast_api_update
DHS model datasetsmodel_datasets
Create dictionary from DHS .MAP codebookparse_map
Parse fixed-width file metadataparse_dcf parse_do parse_meta parse_sps
Combine data frames with columns of class `labelled`rbind_labelled
implementation of data.tables rbindlistrbind_list_base
'rdhs' DHS database through Rrdhs-package rdhs
read in dhs standard file typesread_dhs_dataset
Read DHS Stata data setread_dhs_dta
Read DHS flat file data setread_dhs_flat
Read filetype from a zipped folder based on the file endingread_zipdata
checks if the response is json or not by looking at the responses headersresponse_is_json
converts response to json by first converting the response to textresponse_to_json
Search Survey Variable Definitionssearch_variable_labels
Search Survey Variablessearch_variables
Set rdhs configset_rdhs_config
unzip special that catches for 4GB+unzip_special
Update your current rdhs configupdate_rdhs_config