Balanced and spatially balanced sampling