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 6
Rarely 8
Sometimes 20
Regularly 35
All the time 61
a Sample size = 130


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 116 8
Data cleaning 110 5
Data linking 97 6
Data transfer 63 15
Data visualisation 106 13
Machine learning 64 4
Modelling 80 5
a Sample size = 130


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# 18 50 62
Java / Scala 28 52 50
Javascript / Typescript 43 41 46
Matlab 7 52 71
Python 109 11 10
R 125 2 3
SAS 58 31 41
SPSS 34 43 53
SQL 111 10 9
Stata 24 57 49
VBA 84 27 19
a Sample size = 130


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 17 3 110
Java / Scala 13 2 115
Javascript / Typescript 27 5 98
Matlab 35 4 91
Python 94 2 34
R 108 0 22
SAS 41 4 85
SPSS 33 4 93
SQL 110 0 20
Stata 16 4 110
VBA 47 7 76
a Sample size = 130


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# 13 5 12
Java / Scala 22 6 7
Javascript / Typescript 23 20 7
Matlab 4 3 32
Python 25 84 10
R 19 106 2
SAS 28 30 11
SPSS 22 12 21
SQL 9 102 8
Stata 15 9 7
VBA 39 45 2
a Sample size = 130

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 5
Slightly worse 13
No change 14
Slightly better 41
Significantly better 50
a Sample size = 123


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 9
In education 72
In private sector employment 5
In public sector employment 16
Self-taught 23
Other 4
a Sample size = 129


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 4.0 1.6 3.2 14.5 20.2 56.5
My team open sources its code 4.8 21.8 21.0 25.0 15.3 12.1
I use a source code version control system e.g. Git 0.0 10.5 8.9 12.1 16.9 51.6
Code my team writes is reviewed by a colleague 0.8 2.4 7.3 16.1 28.2 45.2
I write repetitive elements in my code as functions 0.8 0.8 4.0 19.4 32.3 42.7
I unit test my code 5.6 12.9 24.2 21.8 18.5 16.9
I collect my code and supporting material into packages 1.6 33.9 16.1 25.0 14.5 8.9
I follow a standard directory structure when programming 10.5 9.7 13.7 15.3 29.0 21.8
I follow coding guidelines or style guides when programming 0.8 4.0 8.9 21.8 36.3 28.2
I write code to automatically quality assure data 1.6 12.9 18.5 28.2 25.0 13.7
My team applies the principles set out in the Aqua book when carrying out analysis as code 26.6 12.9 10.5 17.7 21.0 11.3
a Sample size = 124


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 0.8 0.8 3.2 8.9 29.0 57.3
Documentation for each function or class 3.2 12.1 6.5 21.0 32.3 25.0
README files 0.8 15.3 12.9 10.5 30.6 29.8
Desk notes 19.4 21.8 11.3 22.6 18.5 6.5
Analytical Quality Assurance (AQA) logs 13.7 19.4 21.0 29.0 12.1 4.8
Data or assumptions registers 12.9 34.7 17.7 12.9 16.9 4.8
Flow charts 1.6 22.6 24.2 32.3 16.1 3.2
a Sample size = 124


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 68
No 39
I don't know what dependency management is 17
a Sample size = 124


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 16
No 89
I don't know what reproducible workflows are 19
a Sample size = 124


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 17
Heard of RAP, have not heard of RAP champions 19
Heard of RAP, does not know department champion 31
Heard of RAP champions, no champion in department 5
Knows department RAP champion 44
a Sample size = 130


Show chart Show table
Line manage anyone who writes codes count
Yes 55
No 27
I don't line manage anyone 48
a Sample size = 130


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 3.5 9.7 16.8 38.1 31.9
I feel supported to implement RAP in my work 2.7 10.6 19.5 38.1 29.2
I know where to find resources to help me implement RAP 1.8 15.0 15.0 38.1 30.1
I understand what the key components of the RAP methodology are 2.7 8.8 15.0 38.1 35.4
I think it is important to implement RAP in my work 3.5 0.9 5.3 40.7 49.6
I and/or my team are currently implementing RAP 6.2 13.3 20.4 26.5 33.6
I or my team are planning on implementing RAP in the next 12 months 5.3 11.5 23.0 27.4 32.7
a Sample size = 113


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 40
Documentation Basic 68
Peer review Basic 91
Team open source code Basic 34
Use open source software Basic 95
Version control Basic 85
Code packages Advanced 29
Continuous integration Advanced 47
Dependency management Advanced 68
Follow code style guidelines Advanced 80
Function documentation Advanced 71
Functions Advanced 93
Unit testing Advanced 44
a Sample size = 124


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 5
1 21
2 9
3 24
4 31
5 26
6 8
a Sample size = 124


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 10
1 18
2 16
3 20
4 21
5 11
6 13
7 15
a Sample size = 124