Data collected and analysed by The Sunday Times Data Team: Stefano Ceccon, Nicola Hughes and Megan Lucero. Development by Ændrew Rininsland.

There are nearly 3,000 postcode districts in The Sunday Times Best Places to Live dataset, compiled and analysed on the 11 measures listed below. A small number of postcode districts were excluded from the possible Best Places To Live due to sample size and data availability.

The percentage of single people (never registered as married or in a same-sex civil partnership) was obtained from the 2011 Census publication ‘Living arrangements, local authorities in the United Kingdom’.

Happiness index
The average Happiness Index for each postcode was derived from the Office for National Statistics publication ‘Personal Well-being Across the UK, 2012/13’. This is a number between 1 and 10 obtained from questions included in the Annual Population Survey.

Top schools
The number of top schools in an area was obtained from The Sunday Times Parent Power list, which is The Sunday Times annual guide to the top performing schools in the country. More than 1,800 schools were added to the dataset, including primary, secondary and independent schools.

The number of underground, overground, DLR and rail stations per postcode districts was derived from lists of stations available on Wikipedia and Usefulthings.

Broadband speed
Mean download speed for broadband was provided by Think Broadband. Where postcode district level data was not available, District Council, Unitary Authority or London Borough estimates were used.

Life expectancy
Life expectancy at birth was obtained from the Office for National Statistics publication ‘ Life expectancy at birth and at age 65 by local areas in the United Kingdom’, 2010–2012.

Property prices
Z-Index was calculated from data provided by Zoopla.

Historic sites
The number of heritage sites for each postcode district was derived from data provided by English Heritage.

Air quality
The mean grams of particles in the air was derived from annual Department for Environment Food and Rural Affairs modelled data, which produces a 1x1 km resolution map of pollutants concentration.