The UK is a popular country for expats from all over the world but if immigrants want to be happy they might want to take advice from British people and live next to the sea.

The seaside town of Leigh-on-Sea in Essex has been named as the happiest place to live in the UK while Troon on the Ayrshire coast in Scotland came second with the Yorkshire town of Harrogate in third place.

The Happy at Home Index from UK property portal Rightmove asked people around the country in 206 areas to rate their home town based on 12 happiness factors.

Leigh-on-Sea was praised for its strong community spirit and sense of belonging, good access to sports and arts activities and opportunities to develop skills In London the borough of Richmond, which nestles on The River Thames in the south west of the city came top and in Wales it was Swansea, also a seaside town.

Almost 24,000 people across the country voted and it seems living next to water, whether it is the sea or a river, makes a location a great place to live.

But these happy places are not necessarily cheap. Indeed, data from Rightmove shows that the ripple effect of rising house prices out from London to the commuter belt has led to a 15% increase in asking prices in Leigh-on-Sea over the past year, to £384,439.

The picturesque spa town of Harrogate has come top for the past three years, and although it’s been knocked off the top this year by the lure of the seaside, it has still made it into third place, with its beautiful green spaces helping its happiness ranking.

‘Well it seems the saying that we do like to be beside the seaside is true, whether you’re down in the South East or up in Scotland,’ said Rightmove’s research manager Abiola Oni.

‘Obviously what happy means to different people can vary greatly, but when you compare which factors score highest in the happiest areas, it shows just how important having friendly people in the local community area is alongside the services and amenities, which is something buyers often tell us when they are looking in new areas to live,’ Oni explained.

‘Space is also one of the most important things when people are looking for a new home, so it’s not surprising that places with open spaces such as beautiful parks and beaches have featured in the top 10,’ Oni added.