The British have a reputation for being a nation of dog lovers. But what is the British Isles' favourite pooch? And does your postcode play a role in which puppy you pick? The BBC analysed 10 years of microchipping data to find out.

The UK's favourite dog is the Labrador retriever, BBC analysis of microchipping data has revealed.

More than 509,000 Labradors were tagged in the past decade by pet registration companies Petlog and Animalcare, making it the country's most popular breed.

In second place came the Jack Russell terrier with more than 376,000 animals tagged. The Staffordshire bull terrier was third, with 356,000.

The data, which included five million dogs but excluded the numerous permutations of crossbreeds, also revealed that Liverpool was the most popular postcode for shih tzus, while greyhounds are the dog of choice in Halifax, West Yorkshire.

Quiz: Test your doggie knowledge

According to the Pet Food Manufacturer's Association, which carries out an annual pet population survey, about 25% of all households own a dog - this equates to more than 8.5 million across the British Isles.

So which factors might dictate the puppy a potential owner picks? Does the size of your home play a role when considering which dog to get? Or is it local breeders who create the supply and demand, shaping the popularity of certain breeds?

Hover over the map (on desktop and tablet only) and you can see, perhaps as expected, that in central London - where space is at a premium - there is a higher proportion of smaller dogs like dachshunds.

On the Scottish borders and in Cornwall, where there is more space, border collies and Labradors prove more popular.

How was the dog map produced?

Image copyright Thinkstock

About five million microchipped dogs are included in the dog map

The data is for the past 10 years - the average lifespan of a dog - and was taken from Petlog and Animalcare, two of the UK's three biggest microchipping firms, covering about 60% of all dogs in the country

The data provided by Petlog and Animal Care included only postcode areas and the dog breeds found within them. It did not include any personal information about pet owners.

Crossbreeds were excluded as these are the most popular dog in all postcodes, and have numerous permutations

Some dogs may have been incorrectly chipped while owners of breeds classed as dangerous dogs are less likely to get their dog chipped

From 2016, chipping data may become a more accurate reflection of dog popularity, as it becomes the legal responsibility of all owners in England to chip their pet

Find out why the government wants to microchip all dogs

So why are Labrador retrievers, Jack Russell terriers, and Staffordshire bull terriers the leading breeds?

The popularity of these dogs is down to the fact they are "wonderfully loyal, easily-trained breeds, suitable for single owners, couples or families", said Kennel Club secretary Caroline Kisko.

But the dog map shows while Labradors are more popular in rural areas, it is Staffies that are favoured in big cities.

"Labradors are very popular working dogs and are equally as happy spending a day out in the field or in the woods as they are curled up on the sofa with their family," said Ms Kisko.

Image copyright Tendy pooches Image caption Boodles, the St Bernard, is not a typical client for Glynis Stewart, who runs Trendy Pooches Dog Grooming Salon and sees lots of shih tzus through her door

Staffordshire bull terriers "are happy living in smaller homes, so are ideal for those in towns or cities," she added.

As for the glut of greyhounds in Halifax, Debra Rothery at Tia Greyhound & Lurcher Rescue, eight miles (12.8km) west of the town, has one explanation.

"It's no surprise at all," she said. "Halifax has the biggest rescue centre in the north of England for lost greyhounds."

So why are smaller dogs favoured in cities? Shih tzu breeder Anna Rogers, from north London, said the breed is popular in the capital because they "are compatible with people's day to day living" and because of their size.

But Prof Lance Workman, of the University of South Wales, who has researched the psychology of dog ownership trends, said "sometimes the heart rules over the head".

Referring to the recent London trend for dachshunds, he said: "They are certainly livelier than they look and can be a bit boisterous and aggressive, so they may not be the best dogs for small flats.

Image copyright Thinkstock

"People need to not only look at the size of the dog but the breeds and their temperaments."

But how are the more unlikely trends explained? For example, why does the Jack Russell appear to be man's best friend in places like Cornwall and south Wales?

"I think there are more working dogs down here because they're practical," said vet Sarah Caldwell, who works at Calwelton Vets, in Callington, Cornwall.

"Jack Russells are popular for ferreting," she added. "We have fewer what I'd call 'fancy dogs' down here which may be down to the availability.

Image caption Professional dog walker Renato Pagano has a variety of different sized dogs he walks in north London

"If you're in the city areas you'll see more fashionable dogs."

Perhaps this could explain the popularity of shih tzus in Liverpool.

"Shih tzus are quite fashionable," said Ingrid Hawk, a groomer at Liverpool's The Posh Pooch. "We get quite a lot of them coming through the doors - they mainly get their full hair cut and a bath and their nails done."

Glynis Stewart, owner of Trendy Pooches Dog Grooming Salon and Spa in Wirral, agreed.

"I think it's a bit of a fashion thing, we sell the coats and jumpers and the bling collars... you've really got to play the game," she said.

Portable Jack Russells

JT Thomas, who takes his Jack Russell, Charlie, for a stroll in Regent's Park, London, said he chose a smaller dog because "he's portable".

"Charlie comes in to the office, we go out for walks and he comes to the pub and sits under the table," he said.

Staffies 'aren't chav dogs'

Image copyright Gill Burdis/Marylyn Godber

Audrey Summerfield, who lives in Wolverhampton and owns three generations of Staffies, said: "They're very compact compared with Labradors."

But some Staffie owners feel their pet pooches are sometimes misrepresented.

Gill Burdis said someone described her Staffie, Stella, as a "baby-eating chav dog" when in fact she was a quiet family dog.

'Gentle' Labradors

Image copyright Sarah Buckingham

"Labradors are very gentle and loyal," said Sarah Buckingham, from Aldwick near Bognor Regis.

"He's got lots of space and he's lucky where he lives because he goes on the beach every day."

'Dapper' dachshunds

Image copyright Lisa Ronchetti

Dachshunds are popular with "trendy" owners in the capital. Lisa Ronchetti who runs the Dachshunds in London club and owns a dog called Milo said it was an "aloof" breed and a "very adaptable city dog" making it popular with city slickers.

"They're small, they don't need miles of walking and they're quite good for small flats," she said.

"They're not ideal family dogs because they like one owner and they can be very aloof, they're not as playful as something like a labradoodle."

Dog graphics produced by Ed Lowther, Ransome Mpini, Nzar Tofiq and John Walton. Artwork by Mark Bryson.