This is a living document. We want our users to get as much value as possible from our analysis. Because of that, we will be updating these pages with additional outputs and insights when possible. To make sure you always access the latest insights, we recommend linking to these pages rather than sharing this analysis any other way at this stage.

Coding frequency and tools

Coding frequency

We asked respondents “In your current role, how often do you write code to complete your work objectives?”.

Show chart Show table
Coding frequency Count
Never 4
Rarely 3
Sometimes 2
Regularly 7
All the time 14
a Sample size = 30


What people are using code for

We asked respondents what data operations they carry out in their work, and whether they use code to do them. Please note we did not ask how much of each data operation is done with code, or how often.

Show chart Show table
Data operation I do some or all of this by coding I do this without coding
Analysis 22 8
Data cleaning 23 3
Data linking 20 0
Data transfer 14 2
Data visualisation 22 6
Machine learning 9 1
Modelling 18 2
a Sample size = 30


Access to and knowledge of programming languages

Given a list of programming tools, we asked respondents to answer “Yes”, “No” or “Don’t know” for the following statements;

  • This tool is available to use for my work.
  • I know how to program with this tool to a level suitable for my work.

Access to tools does not necessarily refer to official policy. Some analysts may have access to tools others cannot access within the same organisation.

Please note that capability in programming languages is self-reported here and was not objectively defined or tested.


Access to coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 2 15 13
Java / Scala 4 13 13
Javascript / Typescript 4 15 11
Matlab 1 14 15
Python 20 6 4
R 28 1 1
SAS 4 7 19
SPSS 6 8 16
SQL 25 3 2
Stata 4 11 15
VBA 15 10 5
a Sample size = 30


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 0 2 28
Java / Scala 0 1 29
Javascript / Typescript 4 1 25
Matlab 3 1 26
Python 12 1 17
R 17 1 12
SAS 2 1 27
SPSS 8 1 21
SQL 22 1 7
Stata 3 2 25
VBA 9 2 19
a Sample size = 30


Access and knowledge gaps

Using the data presented above we calculated the number of respondents with:

  • Access to tools they do not have the capability to use (access only),
  • Access to tools they are able to use (access and knowledge)
  • Or capability to use tools they cannot access at work (knowledge only)
Show chart Show table
Programming language Access only Access and knowledge Knowledge only
C++ / C# 2 0 0
Java / Scala 4 0 0
Javascript / Typescript 2 2 2
Matlab 1 0 3
Python 11 9 3
R 11 17 0
SAS 3 1 1
SPSS 3 3 5
SQL 5 20 2
Stata 2 2 1
VBA 7 8 1
a Sample size = 30

Coding capability


Change in coding ability during current role

This question was only asked of respondents with coding experience outside of their current role. This means analysts who first learned to code in their current role are not included in the data.

Show chart Show table
Ability Change Count
Significantly worse 1
Slightly worse 1
No change 2
Slightly better 7
Significantly better 12
a Sample size = 23


Where respondents first learned to code

Respondents with coding experience outside their current role were asked when they first learned to code. This output also includes analysts who code in their current role but reported no other coding experience.

These data only show where people first learned to code. They do not show all the settings in which they had learned to code, to what extent, or how long ago.

Show chart Show table
First coding experience Count
In current role 4
In education 14
In private sector employment 3
In public sector employment 2
Self-taught 3
Other 1
a Sample size = 27


Coding practices

We asked respondents who said they currently use code in their work how often they carry out various coding practices. For more information on the practices presented below, please read our guidance on Quality Assurance of Code for Analysis and Research.

General coding practices

Show chart Show table
Percent
Question I don't understand this question Never Rarely Sometimes Regularly All the time
I use open source software when programming 0.0 15.4 15.4 7.7 30.8 30.8
My team open sources its code 3.8 42.3 34.6 7.7 11.5 0.0
I use a source code version control system e.g. Git 0.0 50.0 0.0 7.7 19.2 23.1
Code my team writes is reviewed by a colleague 0.0 3.8 3.8 15.4 26.9 50.0
I write repetitive elements in my code as functions 7.7 7.7 3.8 23.1 38.5 19.2
I unit test my code 11.5 30.8 7.7 19.2 15.4 15.4
I collect my code and supporting material into packages 3.8 42.3 23.1 11.5 15.4 3.8
I follow a standard directory structure when programming 7.7 23.1 3.8 23.1 23.1 19.2
I follow coding guidelines or style guides when programming 0.0 15.4 7.7 26.9 38.5 11.5
I write code to automatically quality assure data 0.0 34.6 19.2 26.9 11.5 7.7
My team applies the principles set out in the Aqua book when carrying out analysis as code 69.2 19.2 0.0 3.8 7.7 0.0
a Sample size = 26


Documentation

Embedded documentation is one of the components which make up a RAP minimum viable product. Documentation is important to help others be clear on how to use the product and what the code is intended to do.

Show chart Show table
Percent
Question I don't understand this question Never Rarely Sometimes Regularly All the time
Code comments 7.7 3.8 0.0 0.0 23.1 65.4
Documentation for each function or class 11.5 15.4 3.8 30.8 34.6 3.8
README files 11.5 15.4 11.5 19.2 26.9 15.4
Desk notes 23.1 38.5 15.4 15.4 3.8 3.8
Analytical Quality Assurance (AQA) logs 19.2 42.3 11.5 15.4 7.7 3.8
Data or assumptions registers 34.6 38.5 7.7 7.7 11.5 0.0
Flow charts 11.5 30.8 19.2 15.4 11.5 11.5
a Sample size = 26


Dependency management

Respondents who currently use code in their work were asked whether they use any tools for dependency management. We provided examples of tools that may be used for dependency management:

  • Requirements files, e.g. python requirements.txt or R DESCRIPTION files
  • Virtual environments (e.g. venv or renv) or virtual machines
  • Containers e.g. Docker
Show chart Show table
Use dependency management software Count
Yes 6
No 13
I don't know what dependency management is 7
a Sample size = 26


Reproducible workflow packages

Respondents were asked whether they use continuous integration technologies. As above, respondents were provided with examples of what those might be:

  • GitHub actions
  • Jenkins
  • Travis
Show chart Show table
Use reproducible workflow packages Count
Yes 1
No 17
I don't know what reproducible workflows are 8
a Sample size = 26


RAP knowledge and opinions

We asked respondents about their knowledge of and opinions on reproducible analytical pipelines (RAP). RAP refers to the use of practices from software engineering to make analysis more reproducible. These practices build on the advantages of writing analysis as code by ensuring increased quality, trust, efficiency, business continuity and knowledge management. The RAP champions are a network of analysts across government who promote and support RAP development in their departments.


Knowledge of RAP

We asked our respondents whether they had heard of RAP and what their knowledge is of their own department RAP champion.

Show chart Show table
RAP champion knowledge Count
Have not heard of RAP 12
Heard of RAP, have not heard of RAP champions 6
Heard of RAP, does not know department champion 6
Heard of RAP champions, no champion in department 2
Knows department RAP champion 4
a Sample size = 30


Show chart Show table
Line manage anyone who writes codes count
Yes 5
No 11
I don't line manage anyone 14
a Sample size = 30


Opinions on RAP

We asked respondents who had heard of RAP whether they agreed with a series of statements.

Show chart Show table
Percent
Question Strongly disagree Disagree Neutral Agree Strongly agree
I feel confident implementing RAP in my work 5.6 11.1 38.9 22.2 22.2
I feel supported to implement RAP in my work 5.6 22.2 38.9 16.7 16.7
I know where to find resources to help me implement RAP 5.6 22.2 27.8 27.8 16.7
I understand what the key components of the RAP methodology are 5.6 5.6 44.4 33.3 11.1
I think it is important to implement RAP in my work 0.0 5.6 22.2 50.0 22.2
I and/or my team are currently implementing RAP 5.6 16.7 50.0 16.7 11.1
I or my team are planning on implementing RAP in the next 12 months 0.0 11.1 50.0 22.2 16.7
a Sample size = 18


RAP scores

RAP component scores “regularly” or “all the time” to the relevant questions. For documentation, this includes both code comments and README files. For the continuous integration and dependency management components we only collected “yes”, “no” or “I don’t understand the question” responses. As such, we gave “yes” responses a score of 1. The sum total of each respondent’s scores is presented here as “RAP scores”.

A score of one for each RAP component is derived where respondents answered “regularly” or “all the time” to the relevant questions. For documentation, this includes both code comments and README files. For the continuous integration and dependency management components we only collected “yes”, “no” or “I don’t understand the question” responses. As such, we gave “yes” responses a score of 1. The sum total of each respondent’s scores is presented here as “RAP scores”. “Basic components” are the components which make up the RAP MVP. “Advanced components” are components that help improve reproducibility, but were are considered part of the minimum standard.


RAP components

Show chart Show table
Component Type Count
AQUA book guidance Basic 2
Documentation Basic 10
Peer review Basic 20
Team open source code Basic 3
Use open source software Basic 16
Version control Basic 11
Code packages Advanced 5
Continuous integration Advanced 9
Dependency management Advanced 6
Follow code style guidelines Advanced 13
Function documentation Advanced 10
Functions Advanced 15
Unit testing Advanced 8
a Sample size = 26


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 3
1 5
2 6
3 5
4 5
5 2
a Sample size = 26


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 4
1 7
2 5
3 1
4 2
5 4
6 3
a Sample size = 26