Epidemiology, the statistical study of population health instead of a single person's health, has taken population-wide sampling to a new level—underground.
Instead of collecting data on individuals representing a subset of the population and then averaging it, the researchers let an existing piece of infrastructure do the averaging for them. This also made sure they were actually getting properly anonymized data from every single resident of the study area—because the area of study was "everybody connected to the sewer", and everybody who has one, uses the toilet.
What they were testing, specifically, was the percentage of people who took their medicine, by having the entire city collectively pee in a cup.