Skip to contents

RIDL is UNHCR instance of a CKAN server and is accessible for UNHCR staff at https://ridl.unhcr.org . It is designed to keep track and document dataset within an organisation.

Usage

kobo_ridl(
  ridl,
  datafolder,
  form,
  namethisfile,
  visibility = "public",
  stage = "explo_initial"
)

Arguments

ridl

ridl container where the resources should be added

datafolder

folder where the data used by the notebook are stored

form

names of the file with the analysis plan

namethisfile

all files are archived based on the name of notebook you created. The function automatically get the name of the notebook where it is run from, using basename(rstudioapi::getSourceEditorContext()$path )

visibility

can be "public" per default or set to private for obscure reasons..

stage

allow to document your analysis stage

  • exploration_initial if your crunching is the very initial basic cleaning, relabeling of your data

  • exploration_advance if your crunching

  • interpretation_prez

  • dissemination_story

Value

nothing all analysis files are added as a resources

Details

You conveniently archive there your generated report and save the work you did on a notebook: As you have been working on the data, you want to keep track of it and save your work in a place where it can be useful for other people and avaialble for peer review and quality assessment.

The function saves within the the RIDL container you used to get the data from the following resources:

  • the generated report

  • the analysis plan, aka the extended xlsform used to record relabeling, clean, indicator creation, question grouping, exploration settings

  • the source notebook

The function behavior is the following -

  1. Get metadata from the RIDL dataset

  2. check if the resources to be uploaded is already shared based on the name

  3. if already there update, if not create

The function relies on # install.packages("pak") # pak::pkg_install("edouard-legoupil/riddle")

Examples


### Example used for each template 
## Time to archive your work once done!!
# namethisfile = basename(rstudioapi::getSourceEditorContext()$path )  
# if( params$publish == "yes"){
#   kobo_ridl(ridl = params$ridl,
#             datafolder = params$datafolder,
#             form = params$form,
#             namethisfile =  namethisfile ,
#             visibility =  params$visibility,
#             stage = params$stage) }