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
Never 9.6%
Rarely 12.7%
Sometimes 18.4%
Regularly 39.5%
Always 19.8%
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
Yes 62.9%
No 16.4%
Not sure / not applicable 20.7%
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 Knowledge NA
Python Yes 51.1%
Python No 48.9%
R Yes 80.3%
R No 19.7%
DAX Yes 11%
DAX No 89%
Matlab Yes 12.5%
Matlab No 87.5%
SAS Yes 29.5%
SAS No 70.5%
SPSS Yes 30.1%
SPSS No 69.9%
SQL Yes 59.2%
SQL No 40.8%
Stata Yes 11.4%
Stata No 88.6%
Spark Yes 10.3%
Spark No 89.7%
VBA Yes 14.6%
VBA No 85.4%
None Yes 0.5%
None No 99.5%
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 Use
R 64.4%
SQL 40.9%
Python 31.1%
SAS 13.1%
DAX 7.3%
Spark 6.7%
SPSS 5.2%
VBA 3.5%
Stata 0.9%
Matlab 0.2%
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
Yes, I use it in my current role 57.2%
Yes, but I don't use it in my current role 17.1%
No 25.7%
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
None 3.2%
Less than 1 year 12.7%
Between 1 and 3 years 21.3%
Between 3 and 5 years 20%
Over 5 years 42.8%
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
It has become significantly better 34%
It has become slightly better 36.4%
It has stayed the same 16.2%
It has become slightly worse 9.7%
It has become significantly worse 3.7%
Sample size = 938

Managing a coding project

We asked respondents if they’d feel confident managing a coding project.

Show chart Show table
Would you feel confident managing a coding project? Percentage
Yes 6.2%
No 72.9%
Not sure 20.8%
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
Yes 47.9%
No 20.8%
Not sure / not applicable 31.2%
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(%)
Lack of opportunity 49.3%
Availability of tools 22.8%
Suitability of resources 20.8%
Availability of resources 19.3%
No barriers/not applicable 16.8%
Lack of peer support 14.1%
Lack of management support 12.9%
Sample size = 986

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

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

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
Yes 70%
No 30%
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 Yes
Government Digital and Data 81.6%
Government Economic Service 79.6%
Data Engineers 77.8%
Government Operational Research Service 76.7%
Data Scientists 74.8%
Government Science & Engineering 73.7%
Government Statistician Group 68.5%
Government Social Research 60.3%
Government Geography Profession 60%

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 Yes(%)
Microsoft (e.g. Azure) 19.5%
Amazon (e.g. AWS) 18.7%
Databricks 14.2%
Cloudera 5.8%
Google (e.g. GCP) 3.7%
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
Strongly Disagree 6.3%
Disagree 13%
Neutral 19.4%
Agree 34.3%
Strongly Agree 27%
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 Yes(%)
Not enough time 37.7%
Work not suited to RAP 32.2%
Current skills 28.6%
Lack of guidance 20.8%
Availability of tools 16%
Lack of peer support 14.2%
No barriers 13.6%
Lack of management support 11.1%
Other 5.7%
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 of analysts who code in their work
Use open source software Basic 75.8%
Work to quality standards Basic 64.5%
Version control Basic 53.5%
Peer review Basic 52.8%
Create project README Basic 41.3%
Open source own code Basic 14.7%
Manually test code Advanced 74%
Write functions Advanced 56%
Use configuration files Advanced 55.5%
Follow code style guidelines Advanced 53%
Use control flow Advanced 52.8%
Document dependencies Advanced 32.3%
Document functions Advanced 28.7%
Write automated tests Advanced 14.3%
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
Yes, internal to my organisation 23.8%
Yes, Civil Service or other external standards 16.6%
Yes, both internal and external standards 26.8%
No, I am not aware of any 19.7%
Not sure 13.1%
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
Yes, I use it 29.5%
Yes, but I don't use it 29.2%
No 41.3%
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
Yes 37.2%
No 39.1%
Not sure or not applicable 23.7%
Sample size = 938