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 4
Sometimes 12
Regularly 21
All the time 14
a Sample size = 57


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 48 7
Data cleaning 43 8
Data linking 43 4
Data transfer 22 5
Data visualisation 36 18
Machine learning 5 1
Modelling 30 9
a Sample size = 57


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# 4 31 22
Java / Scala 2 35 20
Javascript / Typescript 6 32 19
Matlab 1 27 29
Python 29 19 9
R 55 2 0
SAS 2 34 21
SPSS 22 26 9
SQL 52 3 2
Stata 12 32 13
VBA 39 12 6
a Sample size = 57


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 3 4 50
Java / Scala 3 4 50
Javascript / Typescript 6 3 48
Matlab 12 4 41
Python 15 2 40
R 50 1 6
SAS 13 2 42
SPSS 23 2 32
SQL 51 0 6
Stata 10 2 45
VBA 16 2 39
a Sample size = 57


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# 3 1 2
Java / Scala 2 0 3
Javascript / Typescript 4 2 4
Matlab 1 0 12
Python 20 9 6
R 5 50 0
SAS 2 0 13
SPSS 9 13 10
SQL 5 47 4
Stata 6 6 4
VBA 25 14 2
a Sample size = 57

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 4
Slightly worse 3
No change 9
Slightly better 20
Significantly better 11
a Sample size = 47


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 9
In education 24
In private sector employment 3
In public sector employment 13
Self-taught 5
Other 1
a Sample size = 55


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 13.7 3.9 3.9 21.6 33.3 23.5
My team open sources its code 19.6 41.2 15.7 11.8 2.0 9.8
I use a source code version control system e.g. Git 2.0 27.5 23.5 15.7 17.6 13.7
Code my team writes is reviewed by a colleague 0.0 2.0 3.9 25.5 29.4 39.2
I write repetitive elements in my code as functions 0.0 11.8 9.8 21.6 29.4 27.5
I unit test my code 23.5 11.8 13.7 19.6 21.6 9.8
I collect my code and supporting material into packages 13.7 51.0 9.8 11.8 9.8 3.9
I follow a standard directory structure when programming 15.7 9.8 7.8 29.4 23.5 13.7
I follow coding guidelines or style guides when programming 5.9 5.9 3.9 33.3 39.2 11.8
I write code to automatically quality assure data 0.0 9.8 19.6 47.1 17.6 5.9
My team applies the principles set out in the Aqua book when carrying out analysis as code 19.6 7.8 7.8 33.3 25.5 5.9
a Sample size = 51


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.0 0.0 0.0 2.0 23.5 74.5
Documentation for each function or class 13.7 11.8 9.8 19.6 37.3 7.8
README files 2.0 27.5 15.7 27.5 15.7 11.8
Desk notes 21.6 7.8 15.7 21.6 21.6 11.8
Analytical Quality Assurance (AQA) logs 17.6 7.8 17.6 29.4 21.6 5.9
Data or assumptions registers 5.9 5.9 9.8 27.5 27.5 23.5
Flow charts 3.9 21.6 29.4 41.2 2.0 2.0
a Sample size = 51


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 11
No 19
I don't know what dependency management is 21
a Sample size = 51


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 20
a Sample size = 51


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 12
Heard of RAP, have not heard of RAP champions 9
Heard of RAP, does not know department champion 21
Heard of RAP champions, no champion in department 0
Knows department RAP champion 13
a Sample size = 57


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


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.1 17.8 28.9 28.9 13.3
I feel supported to implement RAP in my work 8.9 15.6 28.9 28.9 17.8
I know where to find resources to help me implement RAP 4.4 31.1 20.0 26.7 17.8
I understand what the key components of the RAP methodology are 8.9 20.0 20.0 40.0 11.1
I think it is important to implement RAP in my work 4.4 4.4 22.2 42.2 26.7
I and/or my team are currently implementing RAP 13.3 22.2 20.0 24.4 20.0
I or my team are planning on implementing RAP in the next 12 months 13.3 13.3 28.9 28.9 15.6
a Sample size = 45


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 16
Documentation Basic 13
Peer review Basic 35
Team open source code Basic 6
Use open source software Basic 29
Version control Basic 16
Code packages Advanced 7
Continuous integration Advanced 5
Dependency management Advanced 11
Follow code style guidelines Advanced 26
Function documentation Advanced 23
Functions Advanced 29
Unit testing Advanced 16
a Sample size = 51


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 8
1 6
2 16
3 12
4 5
5 3
6 1
a Sample size = 51


Advanced RAP scores

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