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 16
Rarely 16
Sometimes 49
Regularly 88
All the time 61
a Sample size = 230


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 192 30
Data cleaning 172 25
Data linking 143 15
Data transfer 81 21
Data visualisation 147 62
Machine learning 34 2
Modelling 79 19
a Sample size = 230


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# 11 133 86
Java / Scala 11 135 84
Javascript / Typescript 21 127 82
Matlab 11 121 98
Python 144 44 42
R 202 13 15
SAS 109 75 46
SPSS 61 99 70
SQL 143 62 25
Stata 38 123 69
VBA 98 100 32
a Sample size = 230


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 10 14 206
Java / Scala 8 13 209
Javascript / Typescript 14 13 203
Matlab 35 17 178
Python 105 15 110
R 158 9 63
SAS 74 8 148
SPSS 74 15 141
SQL 125 6 99
Stata 39 15 176
VBA 54 16 160
a Sample size = 230


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# 8 3 7
Java / Scala 10 1 7
Javascript / Typescript 12 9 5
Matlab 9 2 33
Python 59 85 20
R 50 152 6
SAS 44 65 9
SPSS 34 27 47
SQL 43 100 25
Stata 20 18 21
VBA 51 47 7
a Sample size = 230

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 7
Slightly worse 14
No change 27
Slightly better 54
Significantly better 72
a Sample size = 174


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 56
In education 105
In private sector employment 8
In public sector employment 14
Self-taught 31
Other 6
a Sample size = 222


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 12.6 13.6 11.2 11.7 27.1 23.8
My team open sources its code 16.8 46.7 15.4 8.9 7.5 4.7
I use a source code version control system e.g. Git 6.1 35.5 16.8 12.1 13.1 16.4
Code my team writes is reviewed by a colleague 1.4 7.5 10.7 25.7 31.3 23.4
I write repetitive elements in my code as functions 4.7 11.2 10.7 24.8 31.3 17.3
I unit test my code 38.3 19.6 9.8 16.8 10.3 5.1
I collect my code and supporting material into packages 14.0 51.9 13.6 11.7 6.1 2.8
I follow a standard directory structure when programming 24.3 15.0 7.9 19.2 24.3 9.3
I follow coding guidelines or style guides when programming 7.5 9.8 7.9 28.0 37.4 9.3
I write code to automatically quality assure data 7.9 28.0 22.0 25.2 9.8 7.0
My team applies the principles set out in the Aqua book when carrying out analysis as code 48.1 15.9 4.7 13.6 15.0 2.8
a Sample size = 214


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 5.6 2.8 1.4 9.8 28.5 51.9
Documentation for each function or class 14.5 19.2 14.0 23.4 20.1 8.9
README files 10.3 29.4 14.0 23.4 15.4 7.5
Desk notes 25.7 19.2 7.9 21.0 19.2 7.0
Analytical Quality Assurance (AQA) logs 37.4 27.6 10.7 11.2 8.9 4.2
Data or assumptions registers 28.0 40.7 6.1 7.9 11.2 6.1
Flow charts 9.8 39.3 21.0 16.4 9.3 4.2
a Sample size = 214


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 31
No 85
I don't know what dependency management is 98
a Sample size = 214


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 123
I don't know what reproducible workflows are 90
a Sample size = 214


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 80
Heard of RAP, have not heard of RAP champions 43
Heard of RAP, does not know department champion 62
Heard of RAP champions, no champion in department 5
Knows department RAP champion 31
a Sample size = 230


Show chart Show table
Line manage anyone who writes codes count
Yes 24
No 74
I don't line manage anyone 132
a Sample size = 230


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 19.3 18.0 22.7 29.3 10.7
I feel supported to implement RAP in my work 14.0 14.0 30.0 28.7 13.3
I know where to find resources to help me implement RAP 14.0 18.7 19.3 37.3 10.7
I understand what the key components of the RAP methodology are 14.0 11.3 26.0 39.3 9.3
I think it is important to implement RAP in my work 4.7 2.7 22.7 40.0 30.0
I and/or my team are currently implementing RAP 17.3 18.0 24.7 26.7 13.3
I or my team are planning on implementing RAP in the next 12 months 14.0 11.3 32.0 26.7 16.0
a Sample size = 150


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 38
Documentation Basic 48
Peer review Basic 117
Team open source code Basic 26
Use open source software Basic 109
Version control Basic 63
Code packages Advanced 19
Continuous integration Advanced 26
Dependency management Advanced 31
Follow code style guidelines Advanced 100
Function documentation Advanced 62
Functions Advanced 104
Unit testing Advanced 33
a Sample size = 214


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 37
1 54
2 57
3 39
4 20
5 6
6 1
a Sample size = 214


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 47
1 62
2 47
3 31
4 16
5 5
6 5
7 1
a Sample size = 214