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 10
Rarely 6
Sometimes 11
Regularly 17
All the time 9
a Sample size = 53


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 41 10
Data cleaning 35 10
Data linking 28 5
Data transfer 13 10
Data visualisation 36 13
Machine learning 7 1
Modelling 22 9
a Sample size = 53


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 33 20
Java / Scala 1 34 18
Javascript / Typescript 6 30 17
Matlab 0 33 20
Python 31 16 6
R 47 5 1
SAS 7 29 17
SPSS 11 27 15
SQL 26 19 8
Stata 7 32 14
VBA 23 22 8
a Sample size = 53


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 6 0 47
Java / Scala 3 1 49
Javascript / Typescript 5 0 48
Matlab 15 0 38
Python 23 1 29
R 44 1 8
SAS 15 0 38
SPSS 14 0 39
SQL 29 0 24
Stata 8 0 45
VBA 7 1 45
a Sample size = 53


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 6
Java / Scala 1 0 3
Javascript / Typescript 3 3 2
Matlab 0 0 15
Python 15 16 7
R 6 41 3
SAS 3 4 11
SPSS 4 7 7
SQL 7 19 10
Stata 6 1 7
VBA 18 5 2
a Sample size = 53

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 1
Slightly worse 6
No change 5
Slightly better 19
Significantly better 15
a Sample size = 46


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 4
In education 31
In private sector employment 1
In public sector employment 6
Self-taught 7
Other 0
a Sample size = 49


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 18.6 7.0 2.3 14.0 16.3 41.9
My team open sources its code 23.3 39.5 11.6 16.3 7.0 2.3
I use a source code version control system e.g. Git 9.3 14.0 25.6 11.6 14.0 25.6
Code my team writes is reviewed by a colleague 0.0 2.3 7.0 11.6 48.8 30.2
I write repetitive elements in my code as functions 4.7 7.0 9.3 11.6 39.5 27.9
I unit test my code 34.9 20.9 9.3 11.6 14.0 9.3
I collect my code and supporting material into packages 4.7 53.5 16.3 18.6 2.3 4.7
I follow a standard directory structure when programming 34.9 11.6 4.7 11.6 30.2 7.0
I follow coding guidelines or style guides when programming 7.0 7.0 7.0 18.6 44.2 16.3
I write code to automatically quality assure data 2.3 34.9 18.6 25.6 18.6 0.0
My team applies the principles set out in the Aqua book when carrying out analysis as code 18.6 7.0 14.0 14.0 32.6 14.0
a Sample size = 43


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 4.7 0.0 2.3 4.7 25.6 62.8
Documentation for each function or class 18.6 11.6 9.3 27.9 16.3 16.3
README files 4.7 14.0 20.9 34.9 16.3 9.3
Desk notes 44.2 20.9 4.7 16.3 7.0 7.0
Analytical Quality Assurance (AQA) logs 25.6 18.6 9.3 18.6 23.3 4.7
Data or assumptions registers 7.0 18.6 4.7 25.6 30.2 14.0
Flow charts 9.3 25.6 34.9 18.6 7.0 4.7
a Sample size = 43


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


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 1
No 21
I don't know what reproducible workflows are 21
a Sample size = 43


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


Show chart Show table
Line manage anyone who writes codes count
Yes 4
No 17
I don't line manage anyone 32
a Sample size = 53


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 10.5 18.4 18.4 42.1 10.5
I feel supported to implement RAP in my work 2.6 21.1 26.3 34.2 15.8
I know where to find resources to help me implement RAP 10.5 26.3 21.1 31.6 10.5
I understand what the key components of the RAP methodology are 13.2 21.1 18.4 42.1 5.3
I think it is important to implement RAP in my work 2.6 5.3 15.8 44.7 31.6
I and/or my team are currently implementing RAP 7.9 28.9 13.2 28.9 21.1
I or my team are planning on implementing RAP in the next 12 months 5.3 26.3 15.8 28.9 23.7
a Sample size = 38


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 20
Documentation Basic 10
Peer review Basic 34
Team open source code Basic 4
Use open source software Basic 25
Version control Basic 17
Code packages Advanced 3
Continuous integration Advanced 8
Dependency management Advanced 10
Follow code style guidelines Advanced 26
Function documentation Advanced 14
Functions Advanced 29
Unit testing Advanced 10
a Sample size = 43


Basic RAP scores

Show chart Show table
Basic RAP score Count
0 2
1 6
2 14
3 12
4 5
5 4
a Sample size = 43


Advanced RAP scores

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