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 6
Rarely 12
Sometimes 9
Regularly 20
All the time 29
a Sample size = 76


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 58 11
Data cleaning 56 6
Data linking 45 4
Data transfer 30 8
Data visualisation 51 15
Machine learning 17 0
Modelling 33 3
a Sample size = 76


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 30 37
Java / Scala 9 33 34
Javascript / Typescript 18 29 29
Matlab 1 30 45
Python 67 6 3
R 76 0 0
SAS 37 17 22
SPSS 13 23 40
SQL 62 11 3
Stata 9 36 31
VBA 51 18 7
a Sample size = 76


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 6 2 68
Java / Scala 3 2 71
Javascript / Typescript 9 1 66
Matlab 19 3 54
Python 37 1 38
R 61 1 14
SAS 33 0 43
SPSS 22 1 53
SQL 57 0 19
Stata 6 2 68
VBA 23 3 50
a Sample size = 76


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 9 0 3
Javascript / Typescript 9 9 0
Matlab 1 0 19
Python 31 36 1
R 15 61 0
SAS 14 23 10
SPSS 6 7 15
SQL 9 53 4
Stata 6 3 3
VBA 29 22 1
a Sample size = 76

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 11
No change 13
Slightly better 21
Significantly better 22
a Sample size = 69


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 8
In education 43
In private sector employment 2
In public sector employment 10
Self-taught 10
Other 1
a Sample size = 75


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 4.3 7.1 7.1 8.6 15.7 57.1
My team open sources its code 7.1 22.9 20.0 15.7 24.3 10.0
I use a source code version control system e.g. Git 0.0 2.9 10.0 11.4 11.4 64.3
Code my team writes is reviewed by a colleague 0.0 2.9 4.3 15.7 27.1 50.0
I write repetitive elements in my code as functions 0.0 5.7 4.3 20.0 34.3 35.7
I unit test my code 15.7 14.3 15.7 30.0 15.7 8.6
I collect my code and supporting material into packages 4.3 42.9 17.1 18.6 11.4 5.7
I follow a standard directory structure when programming 15.7 12.9 17.1 17.1 27.1 10.0
I follow coding guidelines or style guides when programming 1.4 7.1 14.3 22.9 32.9 21.4
I write code to automatically quality assure data 2.9 17.1 24.3 25.7 17.1 12.9
My team applies the principles set out in the Aqua book when carrying out analysis as code 27.1 10.0 11.4 14.3 25.7 11.4
a Sample size = 70


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 1.4 1.4 2.9 8.6 32.9 52.9
Documentation for each function or class 4.3 14.3 11.4 25.7 24.3 20.0
README files 1.4 7.1 15.7 12.9 31.4 31.4
Desk notes 24.3 15.7 15.7 18.6 17.1 8.6
Analytical Quality Assurance (AQA) logs 11.4 18.6 11.4 31.4 22.9 4.3
Data or assumptions registers 8.6 24.3 8.6 14.3 30.0 14.3
Flow charts 1.4 15.7 28.6 38.6 14.3 1.4
a Sample size = 70


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 39
No 11
I don't know what dependency management is 20
a Sample size = 70


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 3
No 41
I don't know what reproducible workflows are 26
a Sample size = 70


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 6
Heard of RAP, have not heard of RAP champions 15
Heard of RAP, does not know department champion 27
Heard of RAP champions, no champion in department 1
Knows department RAP champion 23
a Sample size = 76


Show chart Show table
Line manage anyone who writes codes count
Yes 34
No 7
I don't line manage anyone 35
a Sample size = 76


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 11.4 21.4 11.4 32.9 22.9
I feel supported to implement RAP in my work 5.7 15.7 22.9 32.9 22.9
I know where to find resources to help me implement RAP 7.1 10.0 15.7 45.7 21.4
I understand what the key components of the RAP methodology are 12.9 12.9 17.1 32.9 24.3
I think it is important to implement RAP in my work 7.1 7.1 14.3 34.3 37.1
I and/or my team are currently implementing RAP 20.0 15.7 14.3 24.3 25.7
I or my team are planning on implementing RAP in the next 12 months 18.6 12.9 12.9 30.0 25.7
a Sample size = 70


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 26
Documentation Basic 40
Peer review Basic 54
Team open source code Basic 24
Use open source software Basic 51
Version control Basic 53
Code packages Advanced 12
Continuous integration Advanced 27
Dependency management Advanced 39
Follow code style guidelines Advanced 38
Function documentation Advanced 31
Functions Advanced 49
Unit testing Advanced 17
a Sample size = 70


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 5
1 7
2 2
3 17
4 17
5 14
6 8
a Sample size = 70


Advanced RAP scores

Show chart Show table
Advanced RAP score Count
0 9
1 10
2 14
3 8
4 11
5 6
6 7
7 5
a Sample size = 70