Department summary: NHS

How to use this research

Responding to CARS is voluntary. The results presented here are from a self-selecting sample of government analysts. Because respondents are self-selecting, the results we present reflect the views of the analysts who participated.

For more detail, see the data collection page.

Coding frequency and tools

How often analysts are using code at work

We asked all respondents if they had any coding experience, inside or outside of work. Of 99 respondents, 96% reported having coding experience. We asked respondents with coding experience “In your current role, how often do you write code to complete your work objectives?”

Show chart Show table
In your current role, how often do you write code to complete your work objectives? Percentage
Never 1.1%
Rarely 2.1%
Sometimes 14.7%
Regularly 51.6%
Always 30.5%
Sample size = 95

Access to and knowledge of programming languages

Given a list of programming tools, we asked all respondents if the tool was available to use for their 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.

Access to coding tools

Show chart Show table
Programming tool Yes No Don't know
Python 92.6% 3.2% 4.2%
R 94.7% 2.1% 3.2%
SQL 94.7% 1.1% 4.2%
Matlab 4.2% 50.5% 45.3%
SAS 12.6% 50.5% 36.8%
SPSS 9.5% 49.5% 41.1%
Stata 17.9% 41.1% 41.1%
VBA 60% 15.8% 24.2%
Sample size = 95

Given the same list of programming tools, all respondents were asked if they knew how to program with the tool to a level suitable for their work, answering “Yes”, “No” or “Not required for my work”.

Please note that capability in programming languages is self-reported here and was not objectively defined or tested. The statement “not required for my work” was similarly not defined.

Knowledge of coding tools

Show chart Show table
Programming tool Yes No Not required for my work
Python 67.4% 28.4% 4.2%
R 75.8% 18.9% 5.3%
SQL 93.7% 3.2% 3.2%
Matlab 10.5% 46.3% 43.2%
SAS 11.6% 47.4% 41.1%
SPSS 15.8% 42.1% 42.1%
Stata 13.7% 46.3% 40%
VBA 35.8% 36.8% 27.4%
Sample size = 95

Access to and knowledge of git

We asked respondents to answer “Yes”, “No” or “Don’t know” for the following questions:

  • Is git available to use in your work?
  • Do you know how to use git to version-control your work?

Please note these outputs include people who do not code at work.

Access to git

Show chart Show table
Is Git available to use for your work? Percentage
Yes 94.7%
No 1.1%
Don't know 4.2%
Sample size = 95

Knowledge of git

Show chart Show table
Do you know how to use Git for your work? Percentage
Yes 81.1%
No 15.8%
Not required for my work 3.2%
Sample size = 95

Coding capability and change

Where respondents first learned to code

Respondents with coding experience were asked where they first learned to code.

These data only show where people first learned to code. They do not show all the settings in which they learned to code, to what extent, or how long ago.

Show chart Show table
Where did you first learn to code? Percentage
Self-taught 31.6%
Primary/secondary education 5.3%
Higher Education 42.1%
Current role 7.4%
Previous public sector employment 10.5%
Previous private sector employment 2.1%
Other 1.1%
Sample size = 95

Coding experience

We asked respondents with coding experience how many years of experience they had in a coding role, excluding any years in education.

This data includes any experience in other roles and sectors, but does not define the type of experience.

Show chart Show table
How many years of experience do you have in a coding role? Percentage
None 1.1%
Less than 1 year 4.2%
1 - 3 years 26.3%
3 - 5 years 22.1%
Over 5 years 46.3%
Sample size = 95

Change in coding ability during current role

We asked “Has your coding ability changed during your 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
How has your coding ability changed during your current role? Percentage
It has become significantly better 51.1%
It has become slightly better 34.1%
It has stayed the same 9.1%
It has become slightly worse 4.5%
It has become significantly worse 1.1%
Sample size = 88

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

Open sourcing was defined as ‘making code freely available to be modified and redistributed’

Consistency of good coding practices

Show chart Show table
Statement I don't understand this question (%) Never (%) Rarely (%) Sometimes (%) Regularly (%) All the time (%)
Have code reviewed 0% 4.3% 10.6% 21.3% 22.3% 41.5%
Manually test code 0% 1.1% 1.1% 13.8% 25.5% 58.5%
Separate settings from code 5.3% 7.4% 4.3% 24.5% 23.4% 35.1%
Use a standard code style 13.8% 8.5% 5.3% 12.8% 26.6% 33%
Use control flow 3.2% 4.3% 5.3% 21.3% 28.7% 37.2%
Use open source software 0% 2.1% 1.1% 5.3% 26.6% 64.9%
Write automated tests 7.4% 24.5% 24.5% 14.9% 16% 12.8%
Write functions 3.2% 3.2% 1.1% 24.5% 30.9% 37.2%
Sample size = 94

Documentation

We asked respondents who reported writing code at work how frequently they write different forms of documentation when programming in their current role.

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
Statement I don't understand this question (%) Never (%) Rarely (%) Sometimes (%) Regularly (%) Always (%)
Create README files 3.2% 9.6% 7.4% 24.5% 18.1% 37.2%
Document dependencies 3.2% 17% 21.3% 18.1% 20.2% 20.2%
Document functions 8.5% 19.1% 7.4% 14.9% 28.7% 21.3%
Document manual QA steps 4.3% 9.6% 16% 34% 22.3% 13.8%
Document pipeline design 5.3% 14.9% 16% 20.2% 25.5% 18.1%
Sample size = 94

Working practices

We asked respondents who reported writing code at work how frequently they use good working practices in the coding projects they work on.

Show chart Show table
Statement I don't understand this question (%) Never (%) Rarely (%) Sometimes (%) Regularly (%) Always (%)
Have a succession plan 0% 1.1% 2.1% 18.1% 40.4% 38.3%
Publish code in the open 2.1% 16% 18.1% 36.2% 21.3% 6.4%
Understand project aims 0% 0% 0% 18.1% 30.9% 51.1%
Understand project roles 0% 1.1% 7.4% 21.3% 30.9% 39.4%
Use version control 2.1% 8.5% 6.4% 18.1% 22.3% 42.6%
Work to quality standards 7.4% 6.4% 5.3% 19.1% 30.9% 30.9%
Sample size = 94

Reproducible analytical pipelines (RAP)

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. Please contact the analysis standards and pipelines team for any enquiries about RAP or the champions network.

The Analysis Function RAP strategy was released in June 2022 and sets out plans for adopting RAP across government.

Knowledge of RAP

We asked all respondents if they had heard anything about reproducible analytical pipelines (RAPs).

Show chart Show table
Have you heard of RAP? Percent
Yes 91.9%
No 8.1%
Sample size = 99

Opinions on RAP

We asked respondents who had heard of RAP whether they agreed with a series of statements.

Show chart Show table
Statement Strongly Disagree (%) Disagree (%) Neutral (%) Agree (%) Strongly Agree (%)
I think it is important to implement RAP in my work 0% 2.2% 5.5% 28.6% 63.7%
I have the resources I need to help me implement RAP in my work 4.4% 15.4% 16.5% 37.4% 26.4%
I am currently implementing RAP in my work 5.5% 12.1% 13.2% 36.3% 33%
My department values RAP 6.6% 6.6% 22% 33% 31.9%
Sample size = 91

RAP scores

In this section we present RAP components and RAP scores.

For each RAP component a percent positive was calculated. Positive responses were recorded where an answer of “regularly” or “all the time” was given. For documentation, a positive response was recorded if both code comments and README files questions received positive responses. For the continuous integration and dependency management components, responses of “yes” were recorded as positive.

“Basic” components are the components which make up the RAP MVP. “Advanced” components are components which help improve reproducibility, but are not considered part of the minimum standard.

RAP components

Show chart Show table
RAP component Type Percentage of analysts who code in their work
Use open source software Basic 91.5%
Version control Basic 64.9%
Peer review Basic 63.8%
Work to quality standards Basic 61.7%
Create project README Basic 55.3%
Open source own code Basic 27.7%
Manually test code Advanced 84%
Write functions Advanced 68.1%
Use control flow Advanced 66%
Follow code style guidelines Advanced 59.6%
Use configuration files Advanced 58.5%
Document functions Advanced 50%
Document dependencies Advanced 40.4%
Write automated tests Advanced 28.7%
Sample size = 94