London is one of the worst cities in the UK for young families, according to data compiled by Moneysupermarket.
Read more: Londoners are torn over the Tulip skyscraper
The capital narrowly avoided last place, with Bristol rated the worst UK city for families owing to a decline in good schools and a rise in burglary.
London had the highest average salary and was far ahead of the other 35 cities measured by the comparison website for its number of local parks.
But the capital's high population meant it scored poorly in its number of outstanding Ofsted schools per capita, and together with high house prices, this kept it near the bottom of the table.
Bath took the top spot for a second year in a row in the ranking that compared 35 cities based on factors such as schooling, house prices, job opportunities and access to parks.
The high number of schools serving the population rated ‘outstanding’ by Ofsted, and a good number of job opportunities kept the Somerset city out in front.
Top five UK cities for families:
Other high performers included Newcastle, which came in third place and with the highest number of outstanding-rated schools per head of the population.
Manchester also fared well, with good schools and lower house prices combining with a high number of parks to put the city at number five on the list.
Worst five UK cities for families:
Although renowned for its university, Oxford’s schools fell down the rankings due to a lack of outstanding ratings, and it was rivalled only by London for average house prices, leaving the city languishing in 30th place.
Edinburgh performed poorly as well, with the beauty of the Scottish capital not enough to keep it from a lowly 31st place, due in part to fewer highly rated schools per capita than others.
The city also has one of the highest numbers of burglary hotspots, which reduced its overall score. In its favour though, it did have the second highest number of local parks on the list.