UNITED NATIONSECONOMIC AND SOCIAL COMMISSION FOR ASIA AND THE PACIFIC (ESCAP)STATISTICAL INSTITUTE FOR ASIA AND THE PACIFIC (SIAP)
In partnership withTHE VANUATU BUREAU of STATISTICS (VBoS)

e-Learning Course

Principles of Reproducible Analytical Pipelines for Official Statistics
6 May 2024 – 31 May 2024

I. About the Course
This e-learning course aims to build capacity in national statistical systems for the development andimplementation of Reproducible Analytical Pipelines (RAPs) for Official Statistics.
What is a Reproducible Analytical Pipeline?
Simply put, reproducible analytical pipelines (RAPs) are automated statistical processes (data processingand analysis) that codify to the greatest extent possible the production of official statistics. Common
tools that are used to develop RAP include software such as R or Python, and version control
management tools such as Git.
Reproducibility is at the heart of the approach. It implies that the outputs can be generated again withany new or revised input datasets using the RAP developed. This also implies drafting documents
explaining the RAP that make it possible to build institutional knowledge and use the RAP in the futureby new staff.
Why are Reproducible Analytical Pipelines important for Official Statistics?
All national statistical systems are engaged in the regular, high frequency production of many officialstatistics. For example, most countries compile monthly consumer price index (CPI). The input data forthe compilation of CPI is generally the same from month to month. By developing and implementing anRAP for the compilation of CPI, countries can improve the timeliness and quality of the CPI since
automation reduces the time required to clean and analyze the data; it also reduces the chance of errorsthat could occur when relying on non-automated processes.
Furthermore, the Sustainable Development Goals (SDGs) require that countries use more diverse data
sources in the compilation of indicators. The COVID-19 crisis has shown that automated tools canfacilitate data analysis and reporting when these sources are updated. These tools, including software
such as R and sharing platforms such as GitHub, allow statisticians to streamline data cleaning,compilation, and analysis.
Principles of Reproducible Analytical Pipelines for Official Statistics

Page 1Implementing these new approaches to data processing and analysis and utilizing these modern tools
can aid in the timelier production of statistics and lower the time staff need to produce statistics. Thisapproach is also more transparent, easier to review and to share among staff and thus less prone toerrors in the data and/or statistical analysis. Furthermore, implementing good practices based on RAP
can contribute to building institutional knowledge by ensuring that work programmes can be moreseamlessly transferred among different staff and over time.

II. Target Audience
The main target audience for the course is technical staff working in statistical offices that serve in rolesof data processors or data analysts. Since RAP is a process that involves data from various sources, data
producers and analysists from the broader national statistical system who are interested in RAP arewelcome to enroll in the course.
It is important to note that since this course has a practical goal, participants should have someexperience in R programming. A mandatory tutorial is therefore required for participants to complete
before being able to access the 4 modules of the course.
The workload of this course is 3h/week. It is thus important for participants to organize themselves andallocate enough learning time during the course.

III. Learning Objectives
At the end of the course participants should be able to:
••
•
••
•
•
•

Identify and assemble the critical elements for creating a RAP
Appreciate the logic of the RAP process as a whole
Master the principles of Reproducible Documents
Use R and R Markdown to produce an automatic report
Describe the steps involved in the production of a periodic report.
Recognize the main principles and actions of Git And GitHub for file versioning
Adopt good practices and lessons learned by early adopters of RAP when developing RAP

IV. Course Design and Content
Since R will be used throughout this course, participants should complete a tutorial that will be accessible
before the start of the course. This tutorial provides guidance and resources on R, how to install it , andhow to start with RStudio. The tutorial also shows, through interactive exercises, the main logic of R
programming and provides some simple coding lessons as a refresher in R.
The course will include 5modules including the R tutorial.

Principles of Reproducible Analytical Pipelines for Official Statistics

Page 2

ModuleM0: R and RStudio prerequisites

M1-Why NSOs should invest in RAP?

Coverage•••

How to install R and RStudio
Install packages
Run a few line of code•••

What is a RAP?
Why Reproducibility is important
What are some of the tools that we willlearn more about in this course?
Case Study: The example of Vanuatu RAP••

M2-Tools for RAP•••

M3-Reproducible documents••••

M4-Putting it All Together••••

From Data to R to R markdown: Knitting text
and code together
Basics of R markdown and automatic reports
Introduction to Version control
Case Study: The technical workflow ofVanuatu RAP

Principles and good practices forreproducibility
File management & naming rules
Functions in R
Creation of a fully automated report

Git and GitHub for RAP
Working with version control in RStudioCase Study: A RAP for working with Tradedata at VBoS
To go further: Controlling environments,
advanced tools & methods.

Principles of Reproducible Analytical Pipelines for Official Statistics

Page 3V. Evaluation
The evaluation will be based on the learner’s ability to apply the methods and training materials
described during the course, as well as on their capacity to recall the main outcome of each module. The
final grade will be based on the result of a mandatory assessments exercises, in the form of Multiple
Choice Questions (MCQ)-like tests to complete at the end of each module.
To complete the course, the participant will have to complete a mandatory individual data-based
exercise activity using R and RStudio. This assessment will be limited in time to allow time for grading.
Participation in the various chats/discussion forums will earn bonus points.
To succeed in the course participants must have at least a final score of 70/100, and comply with thefollowing conditions:-Participate in all weekly webinars and complete all mandatory activities prior to the relevant
deadlines
Complete all weekly assessments (tests)
Complete the mandatory practical exercise with R / RStudioParticipants must complete the end-of-course evaluation to receive a certificate.

Principles of Reproducible Analytical Pipelines for Official Statistics

Page 4