In a study published on Monday in the journal Proceedings of the National Academy of Sciences, a team of scientists shows that socioeconomic advantage can be mapped by wastewater. Specifically, the wastewater from wealthier communities where people had higher educational achievement showed higher levels of vitamins, citrus, and fiber, while the waste from poorer communities where people were generally less educated showed higher levels of prescription pain relievers and antidepressant medications.

“Although [wastewater-based epidemiology] has primarily been used for measuring drug consumption, our results demonstrate that it can be used to identify sociodemographic patterns or disparities which associate with consumption of specific chemicals or food components,” writes the team, led by Phil Choi, a Ph.D. student at the Queensland Alliance for Environmental Health Sciences in Australia.

By examining samples from 22 water treatment plants in six Australian states over seven consecutive days in 2016, then comparing the results to 40 different socioeconomic factors from Australia’s national census (factors like rent price and education level), Choi’s team drew a handful of correlations that can be observed in the urine and feces of residents.