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 27
Sometimes 40
Regularly 75
All the time 89
a Sample size = 247


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 203 36
Data cleaning 201 26
Data linking 174 18
Data transfer 92 41
Data visualisation 160 60
Machine learning 42 2
Modelling 99 23
a Sample size = 247


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 129 99
Java / Scala 23 130 94
Javascript / Typescript 40 122 85
Matlab 8 120 119
Python 157 44 46
R 219 13 15
SAS 119 75 53
SPSS 99 74 74
SQL 193 39 15
Stata 67 102 78
VBA 156 56 35
a Sample size = 247


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 15 7 225
Java / Scala 13 8 226
Javascript / Typescript 30 6 211
Matlab 49 10 188
Python 104 4 139
R 183 6 58
SAS 88 5 154
SPSS 105 6 136
SQL 169 3 75
Stata 41 5 201
VBA 77 7 163
a Sample size = 247


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# 16 3 12
Java / Scala 20 3 10
Javascript / Typescript 19 21 9
Matlab 6 2 47
Python 71 86 18
R 44 175 8
SAS 44 75 13
SPSS 43 56 49
SQL 37 156 13
Stata 44 23 18
VBA 83 73 4
a Sample size = 247

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 9
Slightly worse 27
No change 28
Slightly better 81
Significantly better 68
a Sample size = 213


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 33
In education 108
In private sector employment 15
In public sector employment 37
Self-taught 41
Other 5
a Sample size = 239


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 3.9 14.7 8.2 15.2 18.2 39.8
My team open sources its code 6.9 44.2 16.9 16.5 10.8 4.8
I use a source code version control system e.g. Git 5.2 31.6 14.7 12.1 13.0 23.4
Code my team writes is reviewed by a colleague 0.0 3.9 10.0 24.2 31.6 30.3
I write repetitive elements in my code as functions 2.2 7.8 11.3 22.5 28.1 28.1
I unit test my code 22.1 11.7 17.7 19.9 16.0 12.6
I collect my code and supporting material into packages 11.7 40.7 14.7 16.0 10.8 6.1
I follow a standard directory structure when programming 19.5 11.7 12.1 24.2 18.2 14.3
I follow coding guidelines or style guides when programming 3.0 10.4 7.8 26.0 34.6 18.2
I write code to automatically quality assure data 2.6 14.3 19.0 37.2 18.2 8.7
My team applies the principles set out in the Aqua book when carrying out analysis as code 34.2 14.3 9.1 19.9 17.3 5.2
a Sample size = 231


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 2.2 0.4 1.7 4.3 32.0 59.3
Documentation for each function or class 7.4 16.5 13.0 28.6 23.4 11.3
README files 5.2 18.2 16.5 24.7 20.8 14.7
Desk notes 17.7 14.7 12.6 20.8 24.7 9.5
Analytical Quality Assurance (AQA) logs 19.5 29.0 18.2 16.9 13.0 3.5
Data or assumptions registers 17.3 35.1 12.1 13.0 15.2 7.4
Flow charts 5.6 29.0 22.1 29.4 11.3 2.6
a Sample size = 231


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 49
No 96
I don't know what dependency management is 86
a Sample size = 231


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 12
No 136
I don't know what reproducible workflows are 83
a Sample size = 231


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 47
Heard of RAP, have not heard of RAP champions 32
Heard of RAP, does not know department champion 84
Heard of RAP champions, no champion in department 4
Knows department RAP champion 58
a Sample size = 247


Show chart Show table
Line manage anyone who writes codes count
Yes 82
No 64
I don't line manage anyone 101
a Sample size = 247


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 8.5 21.0 23.5 28.0 19.0
I feel supported to implement RAP in my work 4.5 19.5 27.5 30.5 18.0
I know where to find resources to help me implement RAP 3.5 21.5 20.0 43.0 12.0
I understand what the key components of the RAP methodology are 4.5 18.0 18.0 42.5 17.0
I think it is important to implement RAP in my work 2.5 4.0 20.0 37.0 36.5
I and/or my team are currently implementing RAP 10.0 22.0 20.5 26.5 21.0
I or my team are planning on implementing RAP in the next 12 months 6.5 18.5 25.0 27.0 23.0
a Sample size = 200


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 52
Documentation Basic 77
Peer review Basic 143
Team open source code Basic 36
Use open source software Basic 134
Version control Basic 84
Code packages Advanced 39
Continuous integration Advanced 43
Dependency management Advanced 49
Follow code style guidelines Advanced 122
Function documentation Advanced 80
Functions Advanced 130
Unit testing Advanced 66
a Sample size = 231


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 32
1 53
2 50
3 41
4 32
5 16
6 7
a Sample size = 231


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 48
1 45
2 50
3 27
4 31
5 9
6 13
7 8
a Sample size = 231