The measurement of diversity: Ethnic and socioeconomic mixing in residential areas