The built environment can mediate or constrain the opportunities for social interaction, essential to the formation of social ties.
This study uses the large inflow of immigrants in Barcelona between 1998 and 2008 to study whether the configuration of buildings and open urban areas is associated with the residential segregation of immigrants---a proxy for social interaction. Based on a rich set of shape metrics, I use machine learning techniques to classify each block in Barcelona into one of eight typologies with distinctive built environments. I then combine these data with measures of residential segregation constructed at the building level using data on the exact address of each resident of Barcelona. The findings show that some typologies are systematically associated with reduced residential segregation of Spaniards and newly arrived immigrants.