Reproducible Analytical Pipelines

Alice Hannah

Data Innovation Team, Scottish Government

31 July 2025

Is RAP relevant to me?

  • Would it be a nightmare to have to go back and rerun your process from the beginning if you found a mistake?

  • Do you have to make a lot of manual edits to code before each run?

  • Is there a lot of repetition in your code?

  • Would a new person find it difficult to understand the process?

What is RAP?

  • An overall approach to analysis

  • Automated statistical and analytical processes that are:

    • Reproducible

    • Auditable

    • Efficient

    • High quality

RAP principles (1)

In order to achieve the full benefits, at a minimum a RAP must:

  • Minimise manual steps

  • Be built using open-source software; e.g. R, Python

  • Be peer reviewed by colleagues

RAP principles (2)

  • Be version controlled; e.g. Git

  • Be open to anyone; e.g. code published on GitHub

  • Follow good practice for quality assurance

  • Contain well-commented code and have documentation embedded

Self-assessment tool

  • RAP Self-Assessment Tool developed internally for analysts in the Scottish Government.

  • Specific criteria for RAP categorised into 4 ‘levels’: Aspiring, Fundamental, Intermediate and Advanced.

  • Description and links to further resources for each criteria.

  • Complete form and download report to track progress and inform next steps.

Top tips

Project examples