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 12
Rarely 16
Sometimes 3
Regularly 11
All the time 3
a Sample size = 45


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 26 13
Data cleaning 22 4
Data linking 20 4
Data transfer 11 4
Data visualisation 24 14
Machine learning 12 2
Modelling 20 7
a Sample size = 45


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 18 18
Java / Scala 12 17 16
Javascript / Typescript 16 15 14
Matlab 2 18 25
Python 36 5 4
R 42 2 1
SAS 21 10 14
SPSS 18 14 13
SQL 36 8 1
Stata 10 19 16
VBA 32 10 3
a Sample size = 45


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 6 3 36
Java / Scala 5 3 37
Javascript / Typescript 6 4 35
Matlab 9 4 32
Python 21 0 24
R 27 0 18
SAS 12 3 30
SPSS 13 4 28
SQL 32 1 12
Stata 7 5 33
VBA 23 1 21
a Sample size = 45


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# 6 3 3
Java / Scala 10 2 3
Javascript / Typescript 12 4 2
Matlab 2 0 9
Python 17 19 2
R 17 25 2
SAS 13 8 4
SPSS 10 8 5
SQL 6 30 2
Stata 7 3 4
VBA 11 21 2
a Sample size = 45

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 8
Slightly worse 8
No change 9
Slightly better 10
Significantly better 3
a Sample size = 38


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 5
In education 19
In private sector employment 0
In public sector employment 10
Self-taught 9
Other 0
a Sample size = 43


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 12.1 9.1 18.2 15.2 45.5
My team open sources its code 0.0 27.3 18.2 24.2 15.2 15.2
I use a source code version control system e.g. Git 0.0 21.2 9.1 18.2 9.1 42.4
Code my team writes is reviewed by a colleague 0.0 3.0 0.0 18.2 45.5 33.3
I write repetitive elements in my code as functions 0.0 9.1 9.1 27.3 24.2 30.3
I unit test my code 6.1 15.2 27.3 18.2 18.2 15.2
I collect my code and supporting material into packages 0.0 27.3 21.2 24.2 15.2 12.1
I follow a standard directory structure when programming 6.1 15.2 9.1 24.2 15.2 30.3
I follow coding guidelines or style guides when programming 0.0 12.1 15.2 24.2 18.2 30.3
I write code to automatically quality assure data 0.0 15.2 12.1 24.2 30.3 18.2
My team applies the principles set out in the Aqua book when carrying out analysis as code 9.1 15.2 18.2 27.3 15.2 15.2
a Sample size = 33


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.1 3.0 0.0 15.2 24.2 51.5
Documentation for each function or class 9.1 6.1 18.2 15.2 33.3 18.2
README files 9.1 6.1 6.1 21.2 21.2 36.4
Desk notes 18.2 21.2 12.1 24.2 21.2 3.0
Analytical Quality Assurance (AQA) logs 9.1 12.1 27.3 27.3 21.2 3.0
Data or assumptions registers 9.1 30.3 21.2 21.2 15.2 3.0
Flow charts 6.1 15.2 33.3 24.2 18.2 3.0
a Sample size = 33


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 17
No 11
I don't know what dependency management is 5
a Sample size = 33


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


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


Show chart Show table
Line manage anyone who writes codes count
Yes 34
No 8
I don't line manage anyone 3
a Sample size = 45


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.9 11.4 20.0 31.4 34.3
I feel supported to implement RAP in my work 2.9 14.3 20.0 28.6 34.3
I know where to find resources to help me implement RAP 2.9 17.1 8.6 25.7 45.7
I understand what the key components of the RAP methodology are 2.9 14.3 11.4 37.1 34.3
I think it is important to implement RAP in my work 2.9 2.9 14.3 31.4 48.6
I and/or my team are currently implementing RAP 8.6 8.6 11.4 28.6 42.9
I or my team are planning on implementing RAP in the next 12 months 8.6 8.6 25.7 25.7 31.4
a Sample size = 35


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 10
Documentation Basic 16
Peer review Basic 26
Team open source code Basic 10
Use open source software Basic 20
Version control Basic 17
Code packages Advanced 9
Continuous integration Advanced 15
Dependency management Advanced 17
Follow code style guidelines Advanced 16
Function documentation Advanced 17
Functions Advanced 18
Unit testing Advanced 11
a Sample size = 33


Basic RAP scores

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


Advanced RAP scores

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