We have been collecting stats on open repositories of NHS and related healthcare organisations. We use the open GitHub API to pull data from open (public) repositoiries as .json files, then flatten the data into pandas dataframes for analysis. This has produced an interesting dataset that has lots of potential for further analysis and visualisations.

Open Analytics Template

Use of open-source software in the NHS

Open source is the practice of publishing the source code of a software project so that anyone can read, modify, re-use, and improve that software. For more on precise terms, see the Open Knowledge Foundation’s Open Definition. Programmers across the NHS frequently use existing open source packages and modules in their work, especially for routine data analysis or processing, or for mobile development (as part of the NHS App, for instance).

The ‘cambrian explosion’ visualisation captures the rise in open-source software in recent years. From the first open-source repo published by NHS England in 2014, to over 1,200 today. Python, R, and webdev tools (HTML, css, Ruby, PHP) are the most popular languages.

Why whould we open-source our code?

As set out in the NHS Digital Service Manual, public services are built with public money–so unless there’s a good reason not to (security for example), all code produced by the NHS should be made publicly available.

Open source means that the NHS can give our work back to the people who fund it, the public: allowing them to more easily join our staff, more quickly develop products and SMEs to support us, and better understand and trust the work we do on their behalf. NHS Open-source Policy

To this end, the Department of Health & Social Care has made a commitment to make all new NHS code open source and published under open licences such as MIT and OGLv3, which define the legal terms for free access and reuse.

The Transformation Directorate of NHS England (NHSX) has aslo published draft guidance on how to open source your code for health and care organisations with guidance on where to put the code, how to license and what licences to use, how to maintain and case studies of teams who have done this.

The NHS Open Source Policy will become officially available in Summer 2022


The Open-Source Health Statistics project was created by developers at:


NHS Business Services Authority.