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 9
Rarely 10
Sometimes 12
Regularly 7
All the time 3
a Sample size = 41


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 22 16
Data cleaning 16 12
Data linking 10 9
Data transfer 6 13
Data visualisation 14 20
Machine learning 7 1
Modelling 19 16
a Sample size = 41


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# 1 25 15
Java / Scala 1 22 18
Javascript / Typescript 2 23 16
Matlab 0 21 20
Python 37 3 1
R 41 0 0
SAS 41 0 0
SPSS 0 26 15
SQL 12 21 8
Stata 0 24 17
VBA 39 1 1
a Sample size = 41


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 4 1 36
Java / Scala 1 2 38
Javascript / Typescript 1 2 38
Matlab 8 2 31
Python 14 0 27
R 18 1 22
SAS 15 1 25
SPSS 3 3 35
SQL 13 2 26
Stata 0 2 39
VBA 19 1 21
a Sample size = 41


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# 1 0 4
Java / Scala 1 0 1
Javascript / Typescript 1 1 0
Matlab 0 0 8
Python 24 13 1
R 23 18 0
SAS 26 15 0
SPSS 0 0 3
SQL 7 5 8
Stata 0 0 0
VBA 21 18 1
a Sample size = 41

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 3
No change 9
Slightly better 5
Significantly better 5
a Sample size = 27


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 12
In education 18
In private sector employment 4
In public sector employment 2
Self-taught 2
Other 0
a Sample size = 38


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 12.5 31.2 6.2 21.9 18.8 9.4
My team open sources its code 25.0 50.0 18.8 3.1 0.0 3.1
I use a source code version control system e.g. Git 21.9 34.4 15.6 25.0 3.1 0.0
Code my team writes is reviewed by a colleague 6.2 9.4 3.1 12.5 28.1 40.6
I write repetitive elements in my code as functions 6.2 15.6 3.1 28.1 37.5 9.4
I unit test my code 34.4 21.9 0.0 31.2 6.2 6.2
I collect my code and supporting material into packages 21.9 43.8 12.5 15.6 6.2 0.0
I follow a standard directory structure when programming 15.6 15.6 9.4 18.8 28.1 12.5
I follow coding guidelines or style guides when programming 6.2 12.5 9.4 25.0 31.2 15.6
I write code to automatically quality assure data 12.5 40.6 15.6 18.8 9.4 3.1
My team applies the principles set out in the Aqua book when carrying out analysis as code 62.5 12.5 3.1 3.1 12.5 6.2
a Sample size = 32


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 6.2 3.1 0.0 12.5 31.2 46.9
Documentation for each function or class 15.6 9.4 18.8 28.1 25.0 3.1
README files 21.9 15.6 15.6 18.8 21.9 6.2
Desk notes 40.6 21.9 6.2 21.9 9.4 0.0
Analytical Quality Assurance (AQA) logs 37.5 15.6 9.4 15.6 9.4 12.5
Data or assumptions registers 50.0 21.9 12.5 3.1 12.5 0.0
Flow charts 21.9 18.8 12.5 34.4 9.4 3.1
a Sample size = 32


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 3
No 10
I don't know what dependency management is 19
a Sample size = 32


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 0
No 18
I don't know what reproducible workflows are 14
a Sample size = 32


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 37
Heard of RAP, have not heard of RAP champions 1
Heard of RAP, does not know department champion 1
Heard of RAP champions, no champion in department 0
Knows department RAP champion 1
a Sample size = 41


Show chart Show table
Line manage anyone who writes codes count
Yes 13
No 12
I don't line manage anyone 16
a Sample size = 41


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 0 25 25 25 25
I feel supported to implement RAP in my work 0 25 25 25 25
I know where to find resources to help me implement RAP 0 50 0 25 25
I understand what the key components of the RAP methodology are 0 25 25 25 25
I think it is important to implement RAP in my work 0 0 50 25 25
I and/or my team are currently implementing RAP 0 25 50 0 25
I or my team are planning on implementing RAP in the next 12 months 0 25 25 25 25
a Sample size = 4


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 6
Documentation Basic 9
Peer review Basic 22
Team open source code Basic 1
Use open source software Basic 9
Version control Basic 1
Code packages Advanced 2
Continuous integration Advanced 6
Dependency management Advanced 3
Follow code style guidelines Advanced 15
Function documentation Advanced 9
Functions Advanced 15
Unit testing Advanced 4
a Sample size = 32


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 8
1 9
2 9
3 3
4 3
a Sample size = 32


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 8
1 9
2 8
3 3
4 2
5 1
7 1
a Sample size = 32