We combined raw prescription data with expert guidance from qualified doctors and medical researchers, cross-checked against NICE guidelines and other best practice, to develop reasonable assumptions about where prescribing choices may be driving excess spending. We investigated statins as the first area to look at, since the guidance is generally straightforward in that area and well-documented: in almost all cases, generic simvastatin is the recommended best-value option, and is enormously cheaper than branded alternatives.

We identified drugs that only appear in branded formulations (atorvastatin and rosuvastatin calcium) and conservatively assumed that doctors would always have prescribed the cheaper generic form where it exists in any other case - for example, Pravastatin Sodium comes in both branded and generic forms.

We chose to show percentage of total statin items which are definitely branded (atorvastatin/rosuvastatin) as a key measure, since a high branded percentage would tend to show an opportunity for savings.

'Potential savings' were calculated as the amount which would be saved if these branded items were switched to Simvastatin 40mg. We ran the analysis to May 2012 only, as the price of atorvastatin dropped at that point when the drug went off-patent. However, this doesn’t mean that prescribing is a historical problem: there are multiple categories of potential savings, which statins are just an illustration for. For example, an article in the British Medical Journal suggested a £1.4bn annual savings potential from looking across 10 classes of drugs rather than just the one that we’ve covered here.

Data sources

This analysis is made possible by the GP prescription data from the NHS Information Centre, which was released under the Open Government Licence. This shows the count and cost of prescription items at chemical level, prescribed by GP practice and by month, since September 2011.

PCT Boundary data came from the Office of National Statistics, under the OS OpenData Licence. CCG Boundary data came from the NHS Commissioning Board, under the Open Government Licence.

Unfortunately, there is no data source with an open licence where we can directly reference drug prices, as the British National Formulary does not allow us to reuse their data. However, we used the GP preparation-level prescription data to calculate a price for Simvastatin 40mg, and the historical chemical-level data to calculate a median price per branded item, in order to make accurate calculations of the savings potential.

In future, we'd love to see an opening up of the BNF’s rich data in order to help doctors and technologists build many more tools using that source to help deliver better care.

Visualisation and analysis choices

The raw data exists down to GP practice level; however, this site emphasises data aggregated to Primary Care Trust and Clinical Commissioning Group level. This is to ensure that we’re aggregating across large numbers of prescriptions (so that the numbers aren't skewed by a few individual items) and to emphasise that this is a systems and trends issue, rather than being about criticism of individual prescribers.

All the code used to create this analysis is available on github