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 31
Rarely 13
Sometimes 17
Regularly 25
All the time 12
a Sample size = 98


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 65 24
Data cleaning 55 13
Data linking 45 6
Data transfer 14 8
Data visualisation 37 31
Machine learning 9 1
Modelling 14 8
a Sample size = 98


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# 0 72 26
Java / Scala 4 68 26
Javascript / Typescript 4 70 24
Matlab 4 62 32
Python 67 20 11
R 80 11 7
SAS 33 47 18
SPSS 42 25 31
SQL 43 41 14
Stata 22 52 24
VBA 18 61 19
a Sample size = 98


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 2 4 92
Java / Scala 2 5 91
Javascript / Typescript 5 4 89
Matlab 8 5 85
Python 33 5 60
R 49 6 43
SAS 19 1 78
SPSS 68 3 27
SQL 22 1 75
Stata 20 2 76
VBA 9 4 85
a Sample size = 98


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# 0 0 2
Java / Scala 4 0 2
Javascript / Typescript 2 2 3
Matlab 4 0 8
Python 36 31 2
R 36 44 5
SAS 23 10 9
SPSS 9 33 35
SQL 27 16 6
Stata 14 8 12
VBA 13 5 4
a Sample size = 98

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 7
Slightly worse 10
No change 15
Slightly better 14
Significantly better 20
a Sample size = 66


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 21
In education 34
In private sector employment 1
In public sector employment 17
Self-taught 9
Other 1
a Sample size = 85


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 23.9 17.9 7.5 6.0 20.9 23.9
My team open sources its code 28.4 31.3 10.4 20.9 6.0 3.0
I use a source code version control system e.g. Git 17.9 20.9 13.4 13.4 13.4 20.9
Code my team writes is reviewed by a colleague 4.5 3.0 7.5 17.9 38.8 28.4
I write repetitive elements in my code as functions 6.0 17.9 6.0 32.8 20.9 16.4
I unit test my code 49.3 10.4 10.4 14.9 10.4 4.5
I collect my code and supporting material into packages 13.4 47.8 13.4 14.9 4.5 6.0
I follow a standard directory structure when programming 32.8 13.4 10.4 26.9 10.4 6.0
I follow coding guidelines or style guides when programming 9.0 14.9 6.0 22.4 37.3 10.4
I write code to automatically quality assure data 7.5 28.4 20.9 22.4 11.9 9.0
My team applies the principles set out in the Aqua book when carrying out analysis as code 58.2 7.5 7.5 13.4 10.4 3.0
a Sample size = 67


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.0 4.5 4.5 9.0 31.3 44.8
Documentation for each function or class 16.4 25.4 14.9 17.9 14.9 10.4
README files 14.9 35.8 13.4 11.9 16.4 7.5
Desk notes 17.9 17.9 10.4 22.4 23.9 7.5
Analytical Quality Assurance (AQA) logs 28.4 40.3 11.9 13.4 3.0 3.0
Data or assumptions registers 26.9 41.8 4.5 6.0 14.9 6.0
Flow charts 10.4 43.3 9.0 25.4 7.5 4.5
a Sample size = 67


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 5
No 24
I don't know what dependency management is 38
a Sample size = 67


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


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 38
Heard of RAP, have not heard of RAP champions 16
Heard of RAP, does not know department champion 31
Heard of RAP champions, no champion in department 2
Knows department RAP champion 9
a Sample size = 98


Show chart Show table
Line manage anyone who writes codes count
Yes 31
No 26
I don't line manage anyone 41
a Sample size = 98


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 26.7 26.7 21.7 18.3 6.7
I feel supported to implement RAP in my work 16.7 23.3 20.0 31.7 8.3
I know where to find resources to help me implement RAP 16.7 18.3 16.7 36.7 11.7
I understand what the key components of the RAP methodology are 15.0 28.3 20.0 26.7 10.0
I think it is important to implement RAP in my work 8.3 3.3 38.3 30.0 20.0
I and/or my team are currently implementing RAP 28.3 13.3 23.3 28.3 6.7
I or my team are planning on implementing RAP in the next 12 months 25.0 8.3 30.0 26.7 10.0
a Sample size = 60


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 9
Documentation Basic 15
Peer review Basic 45
Team open source code Basic 6
Use open source software Basic 30
Version control Basic 23
Code packages Advanced 7
Continuous integration Advanced 10
Dependency management Advanced 5
Follow code style guidelines Advanced 32
Function documentation Advanced 17
Functions Advanced 25
Unit testing Advanced 10
a Sample size = 67


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 8
1 22
2 15
3 12
4 10
a Sample size = 67


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 20
1 19
2 15
3 4
4 4
5 2
6 2
7 1
a Sample size = 67