To work out the density of pubs in each location, Liberty used a list of pubs compiled by Get the Data derived from the Food Standard Agency's food hygiene ratings, the Office for National Statistics’ postcode directory, and area data for council districts.
Each pub featured in the list was assigned to a district based on its registered address.
With 12 pubs per square mile, Portsmouth topped Liberty’s list ahead of Liverpool, Bristol and Brighton and Hove.
However, the south coast city ranks 190th in the UK in terms of pubs per person, with around eight pubs per 10,000 people compared to London’s 261 pubs per 10,000.
Home to more than 4,500 pubs, London was also put under the spotlight by Liberty, which dissected the capital to determine the city’s most boozy borough.
The City of London came out on top by some distance, with 219 pubs per square mile – 173 more than second-placed Westminster.
At the other end of the spectrum, the Highland district of Scotland has an average of 0.003 pubs per square mile, the lowest in the UK.
Most pubs per square mile - UK top 10
Portsmouth – 12 pubs per square mile
Liverpool – 11 pubs per square mile
Bristol – 10 pubs per square mile
Brighton and Hove – 10 pubs per square mile
Norwich – 10 pubs per square mile
Dundee – 9 pubs per square mile
Manchester – 9 pubs per square mile
Nottingham – 9 pubs per square mile
Southampton – 9 pubs per square mile
Dudley – 8 pubs per square mile
Most pubs per square mile - top 10 London boroughs
City of London – 219 pubs per square mile
Westminster – 46 pubs per square mile
Camden – 33 pubs per square mile
Islington – 32 pubs per square mile
Hackney – 27 pubs per square mile
Kensington & Chelsea – 24 pubs per square mile
Hammersmith & Fulham – 21 pubs per square mile
Southwark – 18 pubs per square mile
Lambeth – 16 pubs per square mile
Wandsworth – 13 pubs per square mile