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 8
Sometimes 14
Regularly 19
All the time 12
a Sample size = 59


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 47 9
Data cleaning 46 7
Data linking 39 9
Data transfer 30 11
Data visualisation 39 14
Machine learning 22 3
Modelling 25 5
a Sample size = 59


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# 14 19 26
Java / Scala 15 23 21
Javascript / Typescript 22 19 18
Matlab 3 26 30
Python 42 9 8
R 52 5 2
SAS 39 12 8
SPSS 14 26 19
SQL 51 5 3
Stata 8 33 18
VBA 39 15 5
a Sample size = 59


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 13 4 42
Java / Scala 6 4 49
Javascript / Typescript 15 4 40
Matlab 9 4 46
Python 33 0 26
R 35 3 21
SAS 28 2 29
SPSS 15 4 40
SQL 46 0 13
Stata 5 5 49
VBA 27 3 29
a Sample size = 59


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 7 6
Java / Scala 12 3 3
Javascript / Typescript 9 13 2
Matlab 2 1 8
Python 14 28 5
R 18 34 1
SAS 14 25 3
SPSS 8 6 9
SQL 9 42 4
Stata 6 2 3
VBA 13 26 1
a Sample size = 59

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 8
No change 15
Slightly better 10
Significantly better 11
a Sample size = 48


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 11
In education 25
In private sector employment 3
In public sector employment 7
Self-taught 11
Other 0
a Sample size = 57


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 0.0 13.2 17.0 15.1 17.0 37.7
My team open sources its code 3.8 34.0 22.6 17.0 11.3 11.3
I use a source code version control system e.g. Git 3.8 22.6 15.1 11.3 17.0 30.2
Code my team writes is reviewed by a colleague 0.0 7.5 9.4 22.6 28.3 32.1
I write repetitive elements in my code as functions 5.7 7.5 7.5 17.0 28.3 34.0
I unit test my code 15.1 13.2 20.8 18.9 13.2 18.9
I collect my code and supporting material into packages 7.5 28.3 24.5 13.2 18.9 7.5
I follow a standard directory structure when programming 9.4 13.2 9.4 20.8 24.5 22.6
I follow coding guidelines or style guides when programming 3.8 7.5 7.5 20.8 28.3 32.1
I write code to automatically quality assure data 7.5 20.8 15.1 30.2 13.2 13.2
My team applies the principles set out in the Aqua book when carrying out analysis as code 35.8 17.0 15.1 11.3 15.1 5.7
a Sample size = 53


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 5.7 3.8 5.7 3.8 28.3 52.8
Documentation for each function or class 7.5 11.3 13.2 24.5 30.2 13.2
README files 3.8 15.1 13.2 17.0 28.3 22.6
Desk notes 20.8 22.6 13.2 22.6 17.0 3.8
Analytical Quality Assurance (AQA) logs 20.8 28.3 18.9 18.9 5.7 7.5
Data or assumptions registers 20.8 47.2 15.1 9.4 7.5 0.0
Flow charts 7.5 28.3 22.6 20.8 15.1 5.7
a Sample size = 53


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


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 6
No 36
I don't know what reproducible workflows are 11
a Sample size = 53


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


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


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 2.2 15.6 13.3 44.4 24.4
I feel supported to implement RAP in my work 2.2 22.2 22.2 28.9 24.4
I know where to find resources to help me implement RAP 6.7 13.3 22.2 28.9 28.9
I understand what the key components of the RAP methodology are 2.2 17.8 17.8 26.7 35.6
I think it is important to implement RAP in my work 2.2 4.4 8.9 35.6 48.9
I and/or my team are currently implementing RAP 2.2 24.4 22.2 28.9 22.2
I or my team are planning on implementing RAP in the next 12 months 2.2 20.0 22.2 31.1 24.4
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 11
Documentation Basic 26
Peer review Basic 32
Team open source code Basic 12
Use open source software Basic 29
Version control Basic 25
Code packages Advanced 14
Continuous integration Advanced 14
Dependency management Advanced 25
Follow code style guidelines Advanced 32
Function documentation Advanced 23
Functions Advanced 33
Unit testing Advanced 17
a Sample size = 53


Basic RAP scores

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


Advanced RAP scores

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