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 15
Rarely 9
Sometimes 7
Regularly 9
All the time 3
a Sample size = 43


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 21 18
Data cleaning 19 10
Data linking 14 6
Data transfer 6 7
Data visualisation 19 19
Machine learning 2 3
Modelling 12 2
a Sample size = 43


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 10
Java / Scala 1 32 10
Javascript / Typescript 4 29 10
Matlab 1 32 10
Python 16 25 2
R 40 3 0
SAS 6 31 6
SPSS 12 24 7
SQL 13 24 6
Stata 16 21 6
VBA 15 25 3
a Sample size = 43


Knowledge of coding tools

Show chart Show table
Programming language Yes Don't Know No
C++ / C# 4 0 39
Java / Scala 2 1 40
Javascript / Typescript 3 0 40
Matlab 7 1 35
Python 9 0 34
R 25 1 17
SAS 3 0 40
SPSS 13 0 30
SQL 11 0 32
Stata 9 0 34
VBA 9 0 34
a Sample size = 43


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 4
Java / Scala 1 0 2
Javascript / Typescript 2 2 1
Matlab 1 0 7
Python 11 5 4
R 16 24 1
SAS 5 1 2
SPSS 7 5 8
SQL 8 5 6
Stata 12 4 5
VBA 7 8 1
a Sample size = 43

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


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


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 25.0 25.0 0.0 3.6 17.9 28.6
My team open sources its code 32.1 32.1 10.7 17.9 7.1 0.0
I use a source code version control system e.g. Git 25.0 32.1 3.6 10.7 14.3 14.3
Code my team writes is reviewed by a colleague 0.0 7.1 7.1 17.9 35.7 32.1
I write repetitive elements in my code as functions 14.3 17.9 3.6 17.9 32.1 14.3
I unit test my code 39.3 21.4 10.7 10.7 7.1 10.7
I collect my code and supporting material into packages 10.7 60.7 3.6 10.7 3.6 10.7
I follow a standard directory structure when programming 35.7 21.4 7.1 10.7 10.7 14.3
I follow coding guidelines or style guides when programming 17.9 21.4 7.1 21.4 32.1 0.0
I write code to automatically quality assure data 10.7 42.9 25.0 0.0 21.4 0.0
My team applies the principles set out in the Aqua book when carrying out analysis as code 28.6 7.1 3.6 14.3 35.7 10.7
a Sample size = 28


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 10.7 14.3 3.6 3.6 25.0 42.9
Documentation for each function or class 25.0 28.6 7.1 10.7 25.0 3.6
README files 14.3 28.6 10.7 21.4 25.0 0.0
Desk notes 39.3 28.6 7.1 14.3 10.7 0.0
Analytical Quality Assurance (AQA) logs 25.0 21.4 10.7 14.3 17.9 10.7
Data or assumptions registers 3.6 21.4 3.6 10.7 32.1 28.6
Flow charts 14.3 39.3 25.0 14.3 7.1 0.0
a Sample size = 28


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 2
No 8
I don't know what dependency management is 18
a Sample size = 28


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 11
I don't know what reproducible workflows are 17
a Sample size = 28


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 29
Heard of RAP, have not heard of RAP champions 2
Heard of RAP, does not know department champion 7
Heard of RAP champions, no champion in department 0
Knows department RAP champion 4
a Sample size = 43


Show chart Show table
Line manage anyone who writes codes count
Yes 14
No 13
I don't line manage anyone 16
a Sample size = 43


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 7.1 14.3 14.3 42.9 21.4
I feel supported to implement RAP in my work 0.0 21.4 28.6 35.7 14.3
I know where to find resources to help me implement RAP 14.3 35.7 14.3 35.7 0.0
I understand what the key components of the RAP methodology are 21.4 14.3 14.3 42.9 7.1
I think it is important to implement RAP in my work 0.0 0.0 14.3 50.0 35.7
I and/or my team are currently implementing RAP 0.0 7.1 21.4 57.1 14.3
I or my team are planning on implementing RAP in the next 12 months 0.0 0.0 35.7 57.1 7.1
a Sample size = 14


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 13
Documentation Basic 5
Peer review Basic 19
Team open source code Basic 2
Use open source software Basic 13
Version control Basic 8
Code packages Advanced 4
Continuous integration Advanced 4
Dependency management Advanced 2
Follow code style guidelines Advanced 9
Function documentation Advanced 8
Functions Advanced 13
Unit testing Advanced 5
a Sample size = 28


Basic RAP scores

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


Advanced RAP scores

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