The first is the drift of non-whites from city centres to suburbs and commuter towns. British and American suburbs are still mostly white, but less so than before. In 1990 just 47% of American Hispanics and 37% of blacks lived in suburbia; by 2010, 59% of Hispanics and 51% of blacks did. Cook County, which includes the city of Chicago, has lost 140,000 black inhabitants since 2000, while the surrounding rural and suburban counties all gained them. Whites are moving into some cities, including Chicago, though rarely as quickly as blacks are leaving.

Some old suburbs have become heavily black or Hispanic—or, in Britain, south Asian. But for the most part suburbanisation leads to mixing. Ethnic minorities who leave city centres tend to be better-off and neither need nor want to live in enclaves. If they choose to move to a newly built suburb, as they often do in America, they will be blocked neither by racist housing laws, which have been abolished, nor by bigoted assumptions about the character of the neighbourhood. That is why the swelling, sprawling cities of the American south and west are so mixed.

A second force for integration is immigration. In Newham the churn caused by immigrants arriving and then moving to better districts has thoroughly dissolved old colour lines. The same is true of parts of America, too. John Logan of Brown University says that whites often stay when Latinos and Asians move in to a district. After a while blacks move in too, taking advantage of the path paved by the Latinos and Asians—and whites mostly continue to stay. Logan Square, a handsome district in north Chicago with wide boulevards and big, stylish houses, seems set to become such a “global neighbourhood”. Its population is 42% white and 46% Hispanic.

A powerful third force is love, which integrates families as well as places. In London whites and black Caribbeans marry or cohabit in such numbers that there are now more children under five who are a mixture of those two groups than there are black Caribbean children. Marriages between whites and Asians are growing, too. America is mixing just as quickly. In 2014, Mr Frey calculates, 19% of new American marriages involving whites and 31% involving blacks were mixed-race. The share for both Hispanics and Asians was 46%. The children of such unions can be hard to deal with statistically. So in the future the numbers will probably underestimate the speed of desegregation.

All this is most welcome. But there is a fourth driver of racial and ethnic integration in cities, which is not so benign. Because big cities are such desirable places to live, and have failed to build enough new homes, they are now so expensive that people can barely afford to segregate themselves. In London property prices have risen so steeply that the average first-time buyer needs to raise a deposit equivalent to about 120% of annual income, according to Neal Hudson of Savills, an estate agent. In the 1980s it was enough to raise just 20-30%.

Increasingly, people just buy property where they can. And along with the great weight of evidence showing that countries are becoming less segregated by race and ethnicity, there is also growing proof that they are becoming more segregated by income. One kind of separation might be replaced by another.