The state of UK public sector analysis code: 2026

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

We asked respondents if they had any coding experience, inside or outside of work. Of 986 respondents, 95.1% had coding experience. We asked all respondents with coding experience β€œIn your current role, how often do you write code to complete your work objectives?”

To see how this compares to other years, see the data collection page

Coding frequency

2026 data

Show chart Show table
In your current role, how often do you write code to complete your work objectives? Percentage Count Total
Never 9.6% 90 939
Rarely 12.7% 119 939
Sometimes 18.4% 173 939
Regularly 39.5% 371 939
Always 19.8% 186 939
Sample size = 939

Coding interest

In 2026, we also asked respondents with coding experience whether they would like to use more coding in their role.

Show chart Show table
Would you prefer to use more coding in your role? Percentage Count Total
Yes 62.9% 591 939
No 16.4% 154 939
Not sure / not applicable 20.7% 194 939
Sample size = 939

Knowledge and use of programming languages

Knowledge of coding tools

Given a list of programming tools, we asked all respondents with coding experience whether they knew how to use each tool, regardless of whether they currently use it in their work. Note this includes respondents who do not code in their current role.

Please note that capability in programming languages is self-reported here and was not objectively defined or tested.

Show chart Show table
Programming tool Percentage Count Total
R 80.3% 792 986
SQL 59.2% 584 986
Python 51.1% 504 986
SPSS 30.1% 297 986
SAS 29.5% 291 986
VBA 14.6% 144 986
Matlab 12.5% 123 986
Stata 11.4% 112 986
DAX 11% 108 986
Spark 10.3% 102 986
Sample size = 986

Use of coding tools

Using the same list of programming tools, we asked respondents which tools they currently use in their role.

Show chart Show table
Programming tool Percentage Count Total
R 64.4% 635 986
SQL 40.9% 403 986
Python 31.1% 307 986
SAS 13.1% 129 986
DAX 7.3% 72 986
Spark 6.7% 66 986
SPSS 5.2% 51 986
VBA 3.5% 35 986
Stata 0.9% 9 986
Matlab 0.2% 2 986
Sample size = 986

Use compared with knowledge of coding tools

The chart below compares the proportion of respondents with coding experience who reported knowing how to use each programming tool with the proportion who reported using it in their current role.

Show chart Show table
Programming tool Use Knowledge
R 64.4% 80.3%
SQL 40.9% 59.2%
Python 31.1% 51.1%
SAS 13.1% 29.5%
SPSS 5.2% 30.1%
DAX 7.3% 11%
VBA 3.5% 14.6%
Spark 6.7% 10.3%
Matlab 0.2% 12.5%
Stata 0.9% 11.4%
None 10% 0.5%

Open source capability over time

The proportion of respondents who report having the capability to use R and Python, is shown alongside the proportion who are able to use SAS, SPSS or Stata, for the past four years of the survey.

Show chart Show table
Programming language type Year Know how to programme with these tools (percent) Lower confidence limit (percent) Upper confidence limit (percent)
2022 Open Source 80.3% 0.7802509 0.8231395
2023 Open Source 72.6% 0.7005951 0.7491138
2024 Open Source 80.9% 0.7869734 0.8296660
2026 Open Source 87% 0.8477586 0.8897332
2022 Proprietary 56.3% 0.5359005 0.5893030
2023 Proprietary 36.1% 0.3351431 0.3873442
2024 Proprietary 40.7% 0.3805305 0.4338641
2026 Proprietary 53.7% 0.5053039 0.5674350

Professions capability in different tools (%)

Differences in preferred languages may lead to silos between analytical professions. Here we show the percentage of respondents reporting capability in different tools, within the different analytical professions.

Please note that respondents might be members of more than one profession, and may report capability in more than one tool.

Profession R Python SQL SPSS Stata SAS VBA Matlab Spark DAX
Government Operational Research Service 93.7 68.4 70.5 10.5 6.3 33.7 24.2 24.2 7.4 14.7
Data Scientists 90.1 84.7 84.7 23.4 6.3 17.1 13.5 24.3 30.6 10.8
Government Science & Engineering 90 65 55 10 5 20 35 15 10 0
Data Engineers 66.7 88.9 83.3 33.3 11.1 16.7 16.7 16.7 27.8 27.8
Government Statistician Group 86.4 50.3 61.8 34.9 10.7 36.8 13.8 14.4 11.3 7
Government Economic Service 77.1 38.6 34.3 7.1 40 21.4 7.1 4.3 1.4 1.4
Government Digital and Data 75.9 68.5 66.7 14.8 5.6 22.2 11.1 13 16.7 16.7
Government Geography Profession 73.7 73.7 52.6 31.6 5.3 0 15.8 31.6 10.5 5.3
Government Social Research 63.8 33 36.2 61.7 14.9 19.1 5.3 3.2 12.8 6.4

Git

We asked respondents to answer β€œYes”, β€œNo” for the following question:

  • Do you know how to use Git?

Please note these outputs include people with coding experience who do not code in their current role.

Show chart Show table
Do you know how to use Git? Percentage Count Total
Yes, I use it in my current role 57.2% 537 938
Yes, but I don't use it in my current role 17.1% 160 938
No 25.7% 241 938
Sample size = 938

Coding capability and change

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 professional coding experience do you have? Percentage Count Total
None 3.2% 30 939
Less than 1 year 12.7% 119 939
Between 1 and 3 years 21.3% 200 939
Between 3 and 5 years 20% 188 939
Over 5 years 42.8% 402 939
Sample size = 939

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 Count Total
It has become significantly better 34% 319 938
It has become slightly better 36.4% 341 938
It has stayed the same 16.2% 152 938
It has become slightly worse 9.7% 91 938
It has become significantly worse 3.7% 35 938
Sample size = 938

Managing a coding project

Respondents who do not currently code in their role were asked if they’d feel confident managing a coding project.

Show chart Show table
Would you feel confident managing a coding project? Percentage Count Total
Yes 6.2% 3 48
No 72.9% 35 48
Not sure 20.8% 10 48
Sample size = 48

Motivation and barriers to coding

Motivation

Respondents who do not currently code in their role were asked whether they would like to use coding as part of their work.

Show chart Show table
Would you like to use coding in your current role? Percentage Count Total
Yes 47.9% 23 48
No 20.8% 10 48
Not sure / not applicable 31.2% 15 48
Sample size = 48

Specific barriers

We asked respondents about any barriers they face in learning to code in their current role. The most commonly cited barrier was a lack of opportunity.

Show chart Show table
Barrier Yes(%) NA NA
Lack of opportunity 52.1% 25 48
Availability of resources 27.1% 13 48
No barriers/not applicable 27.1% 13 48
Suitability of resources 25% 12 48
Availability of tools 16.7% 8 48
Lack of peer support 10.4% 5 48
Lack of management support 8.3% 4 48
Sample size = 48

We also asked respondents about any barriers to improving their coding skills in their current role.

Show chart Show table
Barrier Yes(%) NA NA
Lack of opportunity 49.3% 486 986
Availability of tools 22.8% 225 986
Suitability of resources 20.8% 205 986
Availability of resources 19.3% 190 986
No barriers/not applicable 16.8% 166 986
Lack of peer support 14.1% 139 986
Lack of management support 12.9% 127 986
Sample size = 986

AI tools

Use of AI tools

We asked all respondents who use code in their role, it they use AI tools when coding at work.

The term β€˜AI’ was not defined in this question.

Show chart Show table
Do you use any AI assistants when coding at work? Percentage Count Total
Yes 70% 594 848
No 30% 254 848
Sample size = 848

AI tool use by profession

Overall, 70% of coders reported using AI tools when coding at work. The chart below breaks this down by analytical profession, showing the proportion of coders who use AI assistants.

Show chart Show table
Profession Percentage Count Total
Government Digital and Data 81.6% 40 49
Government Economic Service 79.6% 43 54
Data Engineers 77.8% 14 18
Government Operational Research Service 76.7% 69 90
Data Scientists 74.8% 83 111
Government Science & Engineering 73.7% 14 19
Government Statistician Group 68.5% 315 460
Government Social Research 60.3% 35 58
Government Geography Profession 60% 9 15

How AI tools are used

We asked all respondents who use AI tools when coding at work, what they use these tools for.

Show chart Show table
AI use Never Rarely Sometimes Regularly Always
Debugging code 7.1% 10.1% 29.5% 40.6% 12.8%
Documenting code 41.9% 23.6% 16.8% 12.6% 5.1%
Getting answers to a coding question 1.7% 7.2% 27.9% 50.3% 12.8%
Learning about new concepts 12.5% 18.7% 32.2% 27.6% 9.1%
Testing code 52.4% 21.2% 14.6% 7.7% 4%
Writing code 4% 17% 36.2% 33% 9.8%
Sample size = 594

Cloud tools

Use of cloud tools

Respondents were asked if they use any cloud data platforms in their current role.

Show chart Show table
Data Platform Percentage Count Total
Microsoft (e.g. Azure) 19.5% 192 986
Amazon (e.g. AWS) 18.7% 184 986
Databricks 14.2% 140 986
Cloudera 5.8% 57 986
Google (e.g. GCP) 3.7% 36 986
Sample size = 986

Reproducible analytical pipelines (RAP)

RAP refers to the use of good software engineering practices to make analysis pipelines more reproducible. This approach aims to use automation to improve the quality and efficiency of analytical processes.

The following links contain more resources on RAP:

  • you can find minimum RAP standards in the RAP MVP
  • you can find guidance on quality assuring code in the Duck Book

Implementing RAP

We asked respondents to what extent they agreed with the statement: β€œI am currently implementing RAP in my work.”

Show chart Show table
To what extent to you agree with the following statement: 'I am currently implementing RAP in my work'? Percentage Count Total
Strongly Disagree 6.3% 59 938
Disagree 13% 122 938
Neutral 19.4% 182 938
Agree 34.3% 322 938
Strongly Agree 27% 253 938
Sample size = 938

RAP Barriers

We also asked respondents about the main barriers to implementing RAP in their current role. The most commonly reported barrier was a lack of time.

Show chart Show table
Barrier Percentage Count Total
Not enough time 37.7% 372 986
Work not suited to RAP 32.2% 317 986
Current skills 28.6% 282 986
Lack of guidance 20.8% 205 986
Availability of tools 16% 158 986
Lack of peer support 14.2% 140 986
No barriers 13.6% 134 986
Lack of management support 11.1% 109 986
Other 5.7% 56 986
Sample size = 986

Good coding practices

We asked respondents who reported writing code at work about the good practices they apply when writing code at work. These questions cover many of the coding practices recommended in the quality assurance of code for analysis and research guidance, as well as the minimum RAP standards set by the cross-government RAP champions network.

Coding practices have been classified as either β€˜Basic’ or β€˜Advanced’. Basic practices are those that make up the minimum RAP standards, while Advanced practices help improve reproducibility. The percentage of respondents who reported applying these practices either β€˜Regularly’ or β€˜All the time’ is shown below.

Open sourcing was defined as β€˜making code freely available to be modified and redistributed’

Show chart Show table
RAP component Type Percentage Count Total
Use open source software Basic 75.8% 679 896
Work to quality standards Basic 64.5% 578 896
Version control Basic 53.5% 479 896
Peer review Basic 52.8% 473 896
Create project README Basic 41.3% 370 896
Open source own code Basic 14.7% 132 896
Manually test code Advanced 74% 663 896
Write functions Advanced 56% 502 896
Use configuration files Advanced 55.5% 497 896
Follow code style guidelines Advanced 53% 475 896
Use control flow Advanced 52.8% 473 896
Document dependencies Advanced 32.3% 289 896
Document functions Advanced 28.7% 257 896
Write automated tests Advanced 14.3% 128 896
Sample size = 896

RAP components over time

The table below shows RAP component use over time for 2023, 2024 and 2026. Empty cells indicate that a component was not asked in that year.

RAP component 2023 2024 2026
Use open source software 71.2 79.9 75.8
Manually test code 79.3 74
Work to quality standards 69 64.5
Write functions 55.9 56.2 56
Use configuration files 53.9 55.5
Version control 44.7 56.5 53.5
Follow code style guidelines 49.3 56.9 53
Peer review 53.6 58.7 52.8
Use control flow 58.4 52.8
Create project README 29.4 43.6 41.3
Document dependencies 29.4 34.6 32.3
Document functions 31.6 31.8 28.7
Open source own code 12.5 15.5 14.7
Write automated tests 16.6 14.3

Consistency of good coding practices

We asked respondents who reported writing code at work how frequently they apply good coding practices when writing code at work.

Show chart Show table
Statement I don't understand this question (%) Never (%) Rarely (%) Sometimes (%) Regularly (%) Always (%)
Have code reviewed 2.7% 5.1% 12.6% 23.8% 26.9% 28.9%
Manually test code 3.3% 2.9% 3.9% 11.7% 33% 45.2%
Separate settings from code 8.5% 7.1% 8.4% 17.5% 29.2% 29.4%
Use a standard code style 12.7% 12% 6.1% 13.1% 28.2% 27.8%
Use control flow 7% 9.2% 9% 19.1% 28.8% 27%
Use open source software 2% 4.6% 4.1% 9.2% 21.6% 58.5%
Write automated tests 14.2% 28.5% 23.9% 18.3% 9.9% 5.2%
Write functions 4% 6.2% 10% 20.5% 35.1% 24.1%
Sample size = 848

Code 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 0% 17.1% 13.2% 22.5% 23.3% 23.8%
Document dependencies 0% 25.5% 17.9% 18.2% 18.3% 20.1%
Document functions 0% 32.8% 15.6% 15.9% 18.1% 17.7%
Document manual QA steps 0% 9.7% 15.1% 25.9% 29.7% 19.6%
Document pipeline design 0% 21.3% 18.8% 26.5% 21.3% 12.2%
Sample size = 785

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 5.9% 3.4% 4% 15.1% 35.8% 35.7%
Publish code in the open 13.8% 41.7% 14.9% 14% 9.1% 6.5%
Understand project aims 3.7% 0.4% 1.2% 7.8% 38.6% 48.5%
Understand project roles 9.2% 0.8% 2.6% 14.6% 36.6% 36.2%
Use version control 6.2% 16.4% 9.6% 11.3% 23.1% 33.4%
Work to quality standards 9.3% 2.4% 4% 16.2% 38.3% 29.8%
Sample size = 848

Standards

Respondents were asked whether they follow any analysis or coding quality standards, whether that be either internal standards, external guidance, or a combination of both.

Show chart Show table
Do you work to any analysis or coding quality standards? Percentage Count Total
Yes, internal to my organisation 23.8% 223 938
Yes, Civil Service or other external standards 16.6% 156 938
Yes, both internal and external standards 26.8% 251 938
No, I am not aware of any 19.7% 185 938
Not sure 13.1% 123 938
Sample size = 938

Duck Book

Respondents were asked whether they were aware of the Duck Book.

The Duck Book is guidance produced by the ONS Analysis Standards and Pipelines Hub. It outlines software engineering best practices tailored to analysts and researchers who work with data using code.

Show chart Show table
Are you aware of the 'Duck Book' (Quality Assurance of Code for Analysis and Research)? Percentage Count Total
Yes, I use it 29.5% 103 349
Yes, but I don't use it 29.2% 102 349
No 41.3% 144 349
Sample size = 349

Packages

In 2026, we asked respondents whether they or their team use cross-government or department-specific analysis packages in their work.

See the list of packages reported by respondents on the useful pages page.

Show chart Show table
Do you or your team use any cross-government or department-specific analysis packages in your work? Percentage Count Total
Yes 37.2% 349 938
No 39.1% 367 938
Not sure or not applicable 23.7% 222 938
Sample size = 938

Download tables