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 33
Rarely 35
Sometimes 44
Regularly 60
All the time 52
a Sample size = 224


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 168 44
Data cleaning 159 24
Data linking 141 18
Data transfer 82 33
Data visualisation 138 56
Machine learning 63 5
Modelling 105 33
a Sample size = 224


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# 19 107 98
Java / Scala 33 101 90
Javascript / Typescript 39 102 83
Matlab 11 100 113
Python 159 31 34
R 204 8 12
SAS 106 59 59
SPSS 78 74 72
SQL 160 42 22
Stata 66 85 73
VBA 160 42 22
a Sample size = 224


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 31 8 185
Java / Scala 15 4 205
Javascript / Typescript 28 6 190
Matlab 49 7 168
Python 84 6 134
R 149 3 72
SAS 84 6 134
SPSS 72 5 147
SQL 154 4 66
Stata 35 8 181
VBA 92 5 127
a Sample size = 224


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# 12 7 24
Java / Scala 27 6 9
Javascript / Typescript 20 19 9
Matlab 5 6 43
Python 87 72 12
R 60 144 5
SAS 46 60 24
SPSS 39 39 33
SQL 31 129 25
Stata 45 21 14
VBA 75 85 7
a Sample size = 224

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 15
Slightly worse 38
No change 44
Slightly better 43
Significantly better 59
a Sample size = 199


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 15
In education 104
In private sector employment 10
In public sector employment 43
Self-taught 35
Other 1
a Sample size = 209


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 2.1 14.7 10.5 13.6 24.6 34.6
My team open sources its code 6.8 41.9 20.4 18.8 5.2 6.8
I use a source code version control system e.g. Git 1.6 29.3 9.4 14.7 17.3 27.7
Code my team writes is reviewed by a colleague 0.5 2.6 4.7 24.1 32.5 35.6
I write repetitive elements in my code as functions 2.6 7.3 4.7 23.6 33.5 28.3
I unit test my code 14.7 13.6 16.8 27.2 17.3 10.5
I collect my code and supporting material into packages 5.8 40.8 17.3 23.6 9.4 3.1
I follow a standard directory structure when programming 14.1 12.0 14.7 24.6 24.1 10.5
I follow coding guidelines or style guides when programming 4.2 8.9 11.0 24.6 32.5 18.8
I write code to automatically quality assure data 0.5 16.8 17.3 33.0 20.4 12.0
My team applies the principles set out in the Aqua book when carrying out analysis as code 26.7 13.1 7.9 18.8 22.5 11.0
a Sample size = 191


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.0 3.1 1.6 7.3 26.2 61.8
Documentation for each function or class 5.2 18.8 11.5 19.4 31.4 13.6
README files 0.5 18.3 17.8 20.9 27.2 15.2
Desk notes 17.8 19.4 14.1 24.6 16.8 7.3
Analytical Quality Assurance (AQA) logs 6.8 22.0 14.1 26.7 20.9 9.4
Data or assumptions registers 10.5 31.4 13.6 13.1 22.0 9.4
Flow charts 1.6 24.1 18.8 37.7 14.7 3.1
a Sample size = 191


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 53
No 87
I don't know what dependency management is 51
a Sample size = 191


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 9
No 130
I don't know what reproducible workflows are 52
a Sample size = 191


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 51
Heard of RAP, have not heard of RAP champions 42
Heard of RAP, does not know department champion 54
Heard of RAP champions, no champion in department 8
Knows department RAP champion 54
a Sample size = 224


Show chart Show table
Line manage anyone who writes codes count
Yes 152
No 36
I don't line manage anyone 36
a Sample size = 224


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 6.4 16.8 21.4 36.4 19.1
I feel supported to implement RAP in my work 6.9 17.9 23.1 31.8 20.2
I know where to find resources to help me implement RAP 8.7 14.5 16.8 36.4 23.7
I understand what the key components of the RAP methodology are 5.2 13.9 19.7 37.6 23.7
I think it is important to implement RAP in my work 2.9 6.9 18.5 33.5 38.2
I and/or my team are currently implementing RAP 14.5 16.2 20.8 27.2 21.4
I or my team are planning on implementing RAP in the next 12 months 12.7 15.0 22.0 28.3 22.0
a Sample size = 173


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 64
Documentation Basic 78
Peer review Basic 130
Team open source code Basic 23
Use open source software Basic 113
Version control Basic 86
Code packages Advanced 24
Continuous integration Advanced 38
Dependency management Advanced 53
Follow code style guidelines Advanced 98
Function documentation Advanced 86
Functions Advanced 118
Unit testing Advanced 53
a Sample size = 191


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 15
1 39
2 43
3 36
4 35
5 17
6 6
a Sample size = 191


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 33
1 46
2 29
3 24
4 27
5 14
6 10
7 8
a Sample size = 191