Create the charts yourself

All of the charts in this data release are available to use under open government licence. The charts have been produced using the statistical program R and the JavaScript library D3. The code is available on GitHub, a code repository. GitHub allows anyone to use and comment on the code. Please comment on the code with your suggestions to help us improve as an organisation.

See code for data explorer charts.

In addition, technical documentation and guidance for Public Health Scotland (PHS) staff is available on the PHS Technical Documentation GitHub site.

Last updated: 13 November 2026