mdl_harvest_nada: Harvest from external NADA

View source: R/external_wbg.R

mdl_harvest_nadaR Documentation

Harvest from external NADA

Description

Copies a dataset from another NADA microdata library to the UNHCR MDL. By default, harvests from the WBG library (https://microdata.worldbank.org). Changing the parameters, the harvest should work with other NADA based libraries (given other implementations and versions it may not work though).

Usage

mdl_harvest_nada(
  library_url = "https://microdata.worldbank.org",
  survey_idno,
  base_path = NULL,
  upload_files = FALSE,
  idno_prefix = "WBG",
  enum_collection = mdl_enum_collection$WorldBank,
  overwrite,
  published
)

Arguments

library_url

The url of the library, for example: "https://microdata.worldbank.org"

survey_idno

Unique survey identifier in NADA

base_path

The path on your computer where the files will be downloaded, if not specified uses the current working directory

upload_files

TRUE if you want to upload a copy of the documentation files; FALSE if you want just to put a direct link to the files

idno_prefix

A string to be used as prefix of the idno, so that it can be easily recognized as harvested.

enum_collection

The collection where copy the dataset. Please consider using mdl_enum_collection.

overwrite

TRUE if you want to overwrite the dataset in case it already exists; FALSE if you want to avoid to overwrite

published

TRUE if you want to publish directly the dataset; FALSE if you want just to load it in the back-end

Details

Warning messages about incomplete final line found in readLines is not a concern. Please note that files get downloaded only if not present in the base_path folder: to have up to date files delete them.

Value

API call response.


UNHCRmdl/mdl documentation built on Jan. 15, 2025, 6:40 p.m.