Skip to contents

Archive all crunching files in RIDL

Usage

riddle_notebook(ridl, datafolder, namethisfile, visibility = "public")

Arguments

ridl

ridl container where the resources should be added

datafolder

folder where the data used by the notebook are stored

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..

Value

nothing all analysis files are added as a resources

Details

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.

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 available 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 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

## Time to archive your work once done!!
# used in the  RIDL_Notebook markdown template in the package
# if( params$publish == "yes"){
#   namethisfile = basename(rstudioapi::getSourceEditorContext()$path )  
#   riddle_notebook(ridl = params$ridl,
#             datafolder = params$datafolder, 
#             namethisfile =  namethisfile ,
#             visibility =  params$visibility ) }