mdl_survey_generate_metadata_list: Create metadata list to create a survey

View source: R/survey.R

mdl_survey_generate_metadata_listR Documentation

Create metadata list to create a survey

Description

Creates a list to be passed as an argument to the mdl_survey_create function to create a survey in the MDL.

Usage

mdl_survey_generate_metadata_list(
  survey_idno,
  title,
  country_ISO_alpha3_codes,
  enum_survey_study_type = "",
  series_information = "",
  abstract,
  enum_survey_kind_of_data = "",
  unit_of_analysis = "",
  version_description = "",
  version_date = "",
  scope_description = "",
  enum_survey_topics = c(),
  keywords = c(""),
  geographic_coverage = "",
  universe = "",
  primary_investigators,
  other_producers = c(""),
  sampling_description = "",
  weighting_description = "",
  collection_date_start,
  collection_date_end,
  enum_survey_collection_mode = "",
  data_collection_notes = "",
  data_collectors = c(),
  questionnaire_description = "",
  contacts_list = list(list(name = "Curation team", affiliation = "UNHCR", email =
    "microdata@unhcr.org")),
  publication_year = NULL,
  citation_requirements = NULL,
  metadata_producer = "UNHCR",
  metadata_production_date = as.character(Sys.Date())
)

Arguments

survey_idno

The unique identifier of the survey you want to create, e.g.: UNHCR_ETH_2020_SENS_v2.1

title

Title of the survey. Should not include the name of the country, e.g.: Socioeconomic Survey of Refugees in Kakuma, 2019

country_ISO_alpha3_codes

A vector with the list of countries ISO 3166-1 alpha-3 where the survey took place, e.g.: c("LBN", "SYR"). Full list of codes can be found here: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3

enum_survey_study_type

The type of study. For consistency, we recommend to use the corresponding enumerator, e.g.: mdl_enum_survey_study_type$'Price Survey [hh/prc]'

series_information

If the survey is part of a series, you can provide some info about it.

abstract

The abstract of the survey. Use \n to start a new line in the text.

enum_survey_kind_of_data

Kind of data. For consistency, we recommend to use the corresponding enumerator, e.g.: mdl_enum_survey_kind_of_data$'Sample survey data [ssd]'

unit_of_analysis

Unit of analysis, e.g.: Household and individual

version_description

Description of the version, e.g.: v2.1: Edited, anonymous dataset for licensed distribution

version_date

Date of the version in the format yyyy-mm-dd, eg: 2020-01-30

scope_description

Scope description. Use \n to start a new line in the text.

enum_survey_topics

A vector with the topics. For consistency, we recommend to use the corresponding enumerator, e.g.: c(mdl_enum_survey_topics$Health, mdl_enum_survey_topics$Protection)

keywords

A vector with custom keywords, e.g.: c("Asylum Seekers", "Forced Displacement", "Conflict")

geographic_coverage

Geographic coverage of the survey.

universe

Universe of the survey.

primary_investigators

A vector listing the main organizations that managed the study, e.g.: c("UNCHR", "WFP")

other_producers

A vector listing other organizations involved, e.g.: c("Org1", "Org2")

sampling_description

Description of the sampling. Use \n to start a new line in the text.

weighting_description

Description of the weighting. Use \n to start a new line in the text.

collection_date_start

Date when the collection started in the format yyyy-mm-dd, eg: 2019-02-01

collection_date_end

Date when the collection ended in the format yyyy-mm-dd, eg: 2019-02-25

enum_survey_collection_mode

Collection mode. For consistency, we recommend to use the corresponding enumerator, e.g.: mdl_enum_survey_collection_mode$'Face-to-face [f2f]'

data_collection_notes

Notes on the actual data collection.

data_collectors

Vector with the name of the actual data collectors, e.g.: c("National Bureau of Statistics", "Department of Immigration Services")

questionnaire_description

Description of the questionnaire sections. Use \n to start a new line in the text.

contacts_list

A list with the contacts. Each contact is a list with the following objects: name, affiliation, email; e.g.: list(list(name = "Curation team", affiliation = "UNHCR", email = "microdata@unhcr.org"))

publication_year

Year of publication used in the citation. If not provided, it will be taken from the collection_date_end.

citation_requirements

A string containing the citation requirements. If not specified or NULL is passed, an automatic citation string is created using the other metadata fields. To not include any citation pass an empty string "".

metadata_producer

The metadata producer. By default it is UNHCR

metadata_production_date

The date in which the metadata was produced, in the format yyyy-mm-dd, eg: 2019-04-30. By default, the current date is taken with Sys.Date().

Value

A list containing the metadata to be passed to the mdl_survey_create function.


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