Image copyright PA

Something quite remarkable happened in London in the first decade of the new millennium. The number of white British people in the capital fell by 620,000 - equivalent to the entire population of Glasgow moving out.

The consequence, as revealed by the latest census, is that white Brits are now in a minority in London, making up just 45% of its residents.

So where have they gone to - and why did they leave?

I've been analysing and mapping the census data, and what emerges is a much more positive story than some headlines would make you think.

The movement of the white British is often characterised as white flight - the indigenous population forced out of their neighbourhoods by foreign migrants. That may be part of the story, but I think the evidence suggests it is also about working class aspiration and economic success.

Media playback is unsupported on your device Media caption BBC's Mark Easton: It's a story of success

Trying to track internal migrants is never easy. Just because the population of one place has fallen and another has risen does not mean residents moved between them. But there are some clues as to where London's white British migrated to between the censuses of 2001 and 2011.

While the capital's white British population fell by 620,000, the white British population in the rest of England and Wales increased by 220,000. (The overall fall of 400,000 is explained by a low birth rate and emigration.)

These maps show the change to the white British population in local authorities in England and Wales between 2001 and 2011. (Click between the three headings to see how the white British population is seemingly shifting around the country.)

London's dramatic loss of white British residents is represented by a splash of yellow and orange. Outside the capital, the dominant blues tell a story of an increasing white British population. In some places the rise is quite marked.

Areas with biggest increase

The dozen authorities with the highest percentage increase in the white British population are almost all found in eastern England. Only mid-Devon falls outside a horseshoe of largely rural authorities extending south and east from the Fens.

It would appear that, in the first decade of the 21st Century, the dream of escaping to the country became a reality for tens of thousands of urban white Britons. But did they leave willingly or were they forced to move?

To find out, I have been to Barking and Dagenham, a London borough which has seen a phenomenal change in its cultural make-up over the past decade or so. In 2001, the census records that more than 80% of residents were white British. By 2011, it was statistically in the minority - just 49% of people in the area described themselves as white and British.

The story of Barking and Dagenham is the story of the white working class EastEnders. In the 1920s and 30s, tens of thousands of families were moved out of the inner city slums and into the huge council estates which had been built in the borough.

The 27,000 houses on the Becontree estate were described as homes for heroes, often allocated to the families of World War I servicemen. Another wave of Cockney sparrows built their nests in the area, having been bombed out of the East End during the Blitz in WWII.

Image copyright Getty Images Image caption The Becontree estate in 1950

This was a real step up for many families. Their new homes had indoor toilets and often a small garden. When Ford opened its giant plant at Dagenham in 1931, tens of thousands of jobs provided income security in the midst of profound economic depression.

Although Barking and Dagenham's population declined slightly in the 1960s and 70s, the last years of the 20th Century saw it rise again. Many families took advantage of the right to buy their council house at 30% of its market value - at least two-thirds of the Becontree estate was sold to the private sector.

In 2000, the borough was among the very few places in Greater London where you could still buy a three-bedroom house for under £100,000. The capital's buoyant property market meant that anyone who got on the housing ladder would see their home become a valuable investment during the first 10 years of the new millennium.

The decade also saw the Ford plant contract and ultimately the company announced it was closing down. The economic engine of the borough was being switched off, leading many of the local people to think about their future. In the first 10 years of the new century, the number of full-time jobs in Barking and Dagenham fell by a quarter.

Image copyright Getty Images Image caption Ford is cutting jobs at its Dagenham factory

For many white British households, the 2000s had left them without a job but with a sizeable chunk of capital in their home. Some had also benefited from redundancy pay-outs and pension deals offered by Ford. It was a cue for the families who had left London's East End in the middle of the 20th Century to move on again at the start of the 21st.

A closer look at London reveals how many neighbourhoods in the outer boroughs have seen significant falls in the white British population - Newham, Brent, Haringey, Enfield, Ealing, Hounslow, Merton and Lewisham almost form a ring around the capital. Only the affluent boroughs of Richmond and Kingston along the river to the west prevent the completion of the orange doughnut.

Change in white British population in London between 2001 and 2011

Inner London saw some places losing the white British population, but quite a number - coloured blue - bucked the trend and recorded an increase.

Even central boroughs that experienced a decline in white British may have seen an increase in the number of white residents. Kensington and Chelsea recorded 17,300 fewer white British residents but the category "white other" now makes up 28% of the local population. The immigrants here are rich white Europeans and Russians.

Tea rooms and restaurants have been replaced by takeaway chicken shops and halal supermarkets serving the new arrivals

It is a different story in Barking and Dagenham.

The people moving into the borough tend to be of black African heritage. I was introduced to Victor and Victoria, whose parents came to Britain from Ghana in the 50s. He works for London Transport and she is a nurse in the NHS - typical of the professional black families who've arrived from inner London to take advantage of available housing as the borough's white residents leave.

With a time-lapse camera, it would appear that London is pulsing as generations and ethnic groups move up and move out.

On Dagenham's main shopping street, I met a number of white locals who were planning to leave the borough. One male pensioner was hoping to relocate to Clacton - a seaside town on the Essex coast now nicknamed Little Dagenham. A local councillor told me how his parents had sold up and bought a large cottage with a quarter-acre of garden in Lincolnshire. Another woman says she had her eyes set on a little cottage in Leigh-on-Sea near Southend.

Leigh is a particular favourite. Many residents from Barking and Dagenham will have taken the train along the Thames Estuary towards Southend on a work excursion - the old beano to the seaside. Some still do, looking out of the window as the industrial landscape gives way to green fields and open wetlands teeming with birds.

Over the past decade or so, towns along the railway line between Fenchurch St and Shoeburyness have seen significant increases to the white British population. In Westcliff, part of Southend, I met a family who recently cashed in their three-bedroom house in Barking for a six-bedroom home by the sea. They keep bumping into old school friends, realising that they were joining a sizeable population of migrants from the borough.

Image copyright Getty Images Image caption Polish is the second most common language spoken in England

The years between the last two censuses have witnessed significant cultural change in London, particularly in the outer boroughs. Some white British may have moved because their neighbourhood has been culturally transformed, the tea rooms and restaurants replaced by takeaway chicken shops and halal supermarkets serving the new arrivals.

But there is also a story here of white working class families that escaped from the slums and bombed-out East End in the middle of the last century, found new opportunities in London's outer boroughs and then, in the past decade - often having prospered from the housing boom and the capital's economic growth - cashed in their assets and bought themselves that little cottage in the countryside or by the sea.

It is a story of aspiration. It is a story of success.

Update 16:05 GMT

Fords Dagenham inform me that a recent reorganisation means 3,500 people remain employed at the plant.