computed lexicographical diversity for each city