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 3
Rarely 18
Sometimes 23
Regularly 38
All the time 41
a Sample size = 123


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 107 14
Data cleaning 102 8
Data linking 87 6
Data transfer 47 14
Data visualisation 98 18
Machine learning 36 1
Modelling 80 20
a Sample size = 123


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# 7 51 65
Java / Scala 9 58 56
Javascript / Typescript 23 51 49
Matlab 6 43 74
Python 85 14 24
R 116 0 7
SAS 58 33 32
SPSS 37 51 35
SQL 100 16 7
Stata 24 56 43
VBA 98 16 9
a Sample size = 123


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 19 6 98
Java / Scala 10 5 108
Javascript / Typescript 14 3 106
Matlab 58 4 61
Python 67 3 53
R 108 3 12
SAS 50 3 70
SPSS 15 4 104
SQL 94 3 26
Stata 6 7 110
VBA 60 2 61
a Sample size = 123


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# 5 2 17
Java / Scala 9 0 10
Javascript / Typescript 14 9 5
Matlab 2 4 54
Python 37 48 19
R 9 107 1
SAS 20 38 12
SPSS 28 9 6
SQL 17 83 11
Stata 21 3 3
VBA 42 56 4
a Sample size = 123

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 16
No change 16
Slightly better 46
Significantly better 35
a Sample size = 118


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 6
In education 80
In private sector employment 3
In public sector employment 12
Self-taught 20
Other 2
a Sample size = 123


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 5.0 11.7 8.3 13.3 22.5 39.2
My team open sources its code 10.0 57.5 12.5 10.0 6.7 3.3
I use a source code version control system e.g. Git 1.7 22.5 13.3 18.3 9.2 35.0
Code my team writes is reviewed by a colleague 0.0 1.7 3.3 17.5 45.8 31.7
I write repetitive elements in my code as functions 0.8 5.8 7.5 15.8 32.5 37.5
I unit test my code 19.2 17.5 20.8 21.7 10.8 10.0
I collect my code and supporting material into packages 8.3 48.3 13.3 22.5 4.2 3.3
I follow a standard directory structure when programming 20.0 9.2 13.3 17.5 25.8 14.2
I follow coding guidelines or style guides when programming 1.7 4.2 10.0 24.2 38.3 21.7
I write code to automatically quality assure data 0.0 22.5 20.8 31.7 15.0 10.0
My team applies the principles set out in the Aqua book when carrying out analysis as code 16.7 5.8 11.7 25.0 28.3 12.5
a Sample size = 120


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.0 1.7 7.5 25.8 64.2
Documentation for each function or class 6.7 10.8 11.7 26.7 31.7 12.5
README files 3.3 10.8 14.2 28.3 24.2 19.2
Desk notes 30.8 22.5 10.8 20.8 10.0 5.0
Analytical Quality Assurance (AQA) logs 7.5 13.3 11.7 27.5 31.7 8.3
Data or assumptions registers 5.0 20.0 8.3 19.2 34.2 13.3
Flow charts 2.5 18.3 30.0 27.5 18.3 3.3
a Sample size = 120


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 35
No 49
I don't know what dependency management is 36
a Sample size = 120


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 6
No 80
I don't know what reproducible workflows are 34
a Sample size = 120


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 14
Heard of RAP, have not heard of RAP champions 25
Heard of RAP, does not know department champion 43
Heard of RAP champions, no champion in department 6
Knows department RAP champion 28
a Sample size = 123


Show chart Show table
Line manage anyone who writes codes count
Yes 44
No 22
I don't line manage anyone 57
a Sample size = 123


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 9.2 21.1 20.2 33.0 16.5
I feel supported to implement RAP in my work 6.4 22.0 24.8 29.4 17.4
I know where to find resources to help me implement RAP 8.3 22.0 12.8 40.4 16.5
I understand what the key components of the RAP methodology are 7.3 17.4 20.2 38.5 16.5
I think it is important to implement RAP in my work 2.8 5.5 17.4 45.9 28.4
I and/or my team are currently implementing RAP 15.6 26.6 12.8 27.5 17.4
I or my team are planning on implementing RAP in the next 12 months 8.3 22.0 20.2 29.4 20.2
a Sample size = 109


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 49
Documentation Basic 48
Peer review Basic 93
Team open source code Basic 12
Use open source software Basic 74
Version control Basic 53
Code packages Advanced 9
Continuous integration Advanced 24
Dependency management Advanced 35
Follow code style guidelines Advanced 72
Function documentation Advanced 53
Functions Advanced 84
Unit testing Advanced 25
a Sample size = 120


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 8
1 14
2 32
3 30
4 22
5 11
6 3
a Sample size = 120


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 14
1 26
2 24
3 21
4 19
5 9
6 5
7 2
a Sample size = 120