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 8
Rarely 8
Sometimes 27
Regularly 40
All the time 28
a Sample size = 111


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 95 12
Data cleaning 93 6
Data linking 81 10
Data transfer 44 25
Data visualisation 83 18
Machine learning 31 3
Modelling 51 7
a Sample size = 111


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# 9 50 52
Java / Scala 7 55 49
Javascript / Typescript 12 52 47
Matlab 1 47 63
Python 40 33 38
R 101 5 5
SAS 104 5 2
SPSS 34 47 30
SQL 87 18 6
Stata 12 58 41
VBA 63 30 18
a Sample size = 111


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 6 7 98
Java / Scala 5 7 99
Javascript / Typescript 9 8 94
Matlab 23 6 82
Python 35 5 71
R 90 3 18
SAS 82 2 27
SPSS 35 6 70
SQL 82 2 27
Stata 10 7 94
VBA 36 8 67
a Sample size = 111


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# 7 2 4
Java / Scala 7 0 5
Javascript / Typescript 8 4 5
Matlab 1 0 23
Python 27 13 22
R 15 86 4
SAS 23 81 1
SPSS 16 18 17
SQL 15 72 10
Stata 10 2 8
VBA 31 32 4
a Sample size = 111

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 2
Slightly worse 9
No change 20
Slightly better 32
Significantly better 29
a Sample size = 92


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 22
In education 53
In private sector employment 3
In public sector employment 13
Self-taught 14
Other 3
a Sample size = 109


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.6 14.6 25.2 24.3 17.5
My team open sources its code 9.7 55.3 16.5 10.7 4.9 2.9
I use a source code version control system e.g. Git 3.9 35.9 20.4 18.4 8.7 12.6
Code my team writes is reviewed by a colleague 0.0 2.9 5.8 19.4 39.8 32.0
I write repetitive elements in my code as functions 1.9 7.8 11.7 30.1 29.1 19.4
I unit test my code 25.2 17.5 18.4 16.5 14.6 7.8
I collect my code and supporting material into packages 8.7 51.5 18.4 16.5 2.9 1.9
I follow a standard directory structure when programming 22.3 15.5 9.7 23.3 15.5 13.6
I follow coding guidelines or style guides when programming 3.9 5.8 11.7 27.2 34.0 17.5
I write code to automatically quality assure data 3.9 23.3 14.6 35.9 15.5 6.8
My team applies the principles set out in the Aqua book when carrying out analysis as code 36.9 14.6 6.8 17.5 15.5 8.7
a Sample size = 103


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.9 1.0 1.9 4.9 24.3 65.0
Documentation for each function or class 8.7 14.6 11.7 22.3 34.0 8.7
README files 2.9 17.5 13.6 35.0 20.4 10.7
Desk notes 32.0 17.5 11.7 17.5 15.5 5.8
Analytical Quality Assurance (AQA) logs 22.3 16.5 17.5 18.4 18.4 6.8
Data or assumptions registers 20.4 32.0 13.6 11.7 15.5 6.8
Flow charts 6.8 20.4 25.2 29.1 14.6 3.9
a Sample size = 103


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 13
No 50
I don't know what dependency management is 40
a Sample size = 103


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 67
I don't know what reproducible workflows are 28
a Sample size = 103


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


Show chart Show table
Line manage anyone who writes codes count
Yes 24
No 34
I don't line manage anyone 53
a Sample size = 111


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.3 13.1 26.2 34.5 17.9
I feel supported to implement RAP in my work 6.0 14.3 20.2 39.3 20.2
I know where to find resources to help me implement RAP 7.1 14.3 15.5 41.7 21.4
I understand what the key components of the RAP methodology are 4.8 15.5 16.7 40.5 22.6
I think it is important to implement RAP in my work 3.6 4.8 15.5 40.5 35.7
I and/or my team are currently implementing RAP 8.3 20.2 16.7 38.1 16.7
I or my team are planning on implementing RAP in the next 12 months 6.0 16.7 22.6 34.5 20.2
a Sample size = 84


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 25
Documentation Basic 31
Peer review Basic 74
Team open source code Basic 8
Use open source software Basic 43
Version control Basic 22
Code packages Advanced 5
Continuous integration Advanced 12
Dependency management Advanced 13
Follow code style guidelines Advanced 53
Function documentation Advanced 44
Functions Advanced 50
Unit testing Advanced 23
a Sample size = 103


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 12
1 27
2 34
3 15
4 12
5 3
a Sample size = 103


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 19
1 31
2 18
3 14
4 16
5 3
6 2
a Sample size = 103