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 11
Rarely 10
Sometimes 13
Regularly 37
All the time 35
a Sample size = 106


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 84 13
Data cleaning 82 6
Data linking 68 6
Data transfer 39 16
Data visualisation 73 14
Machine learning 20 0
Modelling 42 6
a Sample size = 106


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# 16 50 40
Java / Scala 18 52 36
Javascript / Typescript 26 50 30
Matlab 10 47 49
Python 71 19 16
R 89 8 9
SAS 29 45 32
SPSS 23 47 36
SQL 83 17 6
Stata 23 51 32
VBA 57 37 12
a Sample size = 106


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 15 4 87
Java / Scala 10 3 93
Javascript / Typescript 14 5 87
Matlab 18 7 81
Python 48 6 52
R 68 4 34
SAS 28 4 74
SPSS 21 5 80
SQL 76 1 29
Stata 14 4 88
VBA 36 5 65
a Sample size = 106


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# 10 6 9
Java / Scala 14 4 6
Javascript / Typescript 14 12 2
Matlab 6 4 14
Python 29 42 6
R 22 67 1
SAS 9 20 8
SPSS 13 10 11
SQL 15 68 8
Stata 13 10 4
VBA 23 34 2
a Sample size = 106

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 4
Slightly worse 6
No change 19
Slightly better 21
Significantly better 32
a Sample size = 82


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 16
In education 34
In private sector employment 11
In public sector employment 10
Self-taught 23
Other 2
a Sample size = 96


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 7.4 9.5 9.5 11.6 25.3 36.8
My team open sources its code 9.5 43.2 12.6 23.2 8.4 3.2
I use a source code version control system e.g. Git 4.2 30.5 7.4 12.6 22.1 23.2
Code my team writes is reviewed by a colleague 2.1 3.2 9.5 34.7 29.5 21.1
I write repetitive elements in my code as functions 2.1 5.3 10.5 21.1 28.4 32.6
I unit test my code 26.3 10.5 15.8 23.2 13.7 10.5
I collect my code and supporting material into packages 10.5 30.5 15.8 27.4 12.6 3.2
I follow a standard directory structure when programming 21.1 10.5 11.6 16.8 27.4 12.6
I follow coding guidelines or style guides when programming 6.3 9.5 10.5 28.4 30.5 14.7
I write code to automatically quality assure data 4.2 18.9 15.8 36.8 14.7 9.5
My team applies the principles set out in the Aqua book when carrying out analysis as code 51.6 14.7 9.5 11.6 10.5 2.1
a Sample size = 95


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 4.2 1.1 1.1 9.5 22.1 62.1
Documentation for each function or class 10.5 16.8 8.4 27.4 26.3 10.5
README files 10.5 20.0 12.6 28.4 16.8 11.6
Desk notes 30.5 21.1 7.4 23.2 12.6 5.3
Analytical Quality Assurance (AQA) logs 31.6 24.2 11.6 18.9 10.5 3.2
Data or assumptions registers 28.4 43.2 13.7 6.3 7.4 1.1
Flow charts 7.4 27.4 18.9 33.7 10.5 2.1
a Sample size = 95


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 24
No 45
I don't know what dependency management is 26
a Sample size = 95


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 8
No 61
I don't know what reproducible workflows are 26
a Sample size = 95


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 48
Heard of RAP, have not heard of RAP champions 16
Heard of RAP, does not know department champion 23
Heard of RAP champions, no champion in department 3
Knows department RAP champion 11
a Sample size = 106


Show chart Show table
Line manage anyone who writes codes count
Yes 27
No 39
I don't line manage anyone 40
a Sample size = 106


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.2 19.0 24.1 34.5 17.2
I feel supported to implement RAP in my work 8.6 19.0 27.6 27.6 17.2
I know where to find resources to help me implement RAP 6.9 19.0 27.6 36.2 10.3
I understand what the key components of the RAP methodology are 6.9 10.3 27.6 43.1 12.1
I think it is important to implement RAP in my work 6.9 1.7 15.5 31.0 44.8
I and/or my team are currently implementing RAP 8.6 17.2 24.1 31.0 19.0
I or my team are planning on implementing RAP in the next 12 months 8.6 13.8 27.6 32.8 17.2
a Sample size = 58


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 12
Documentation Basic 24
Peer review Basic 48
Team open source code Basic 11
Use open source software Basic 59
Version control Basic 43
Code packages Advanced 15
Continuous integration Advanced 16
Dependency management Advanced 24
Follow code style guidelines Advanced 43
Function documentation Advanced 35
Functions Advanced 58
Unit testing Advanced 23
a Sample size = 95


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 12
1 26
2 23
3 19
4 9
5 4
6 2
a Sample size = 95


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 19
1 25
2 15
3 11
4 13
5 2
6 6
7 4
a Sample size = 95