Over the past year, as people stopped making appointments with health care providers to check for COVID and shifted to taking home tests instead, health officials lost their tight grip on case tallies. And in turn, it became tougher to spot a new viral variant or wave of the pandemic. Thankfully epidemiologists had a solution—in poop, or rather sewage.

In September 2020, the Centers for Disease Control and Prevention established the National Wastewater Surveillance System (NWSS) with the goal of collecting and testing local levels of the virus that causes COVID at treatment plants across the country. While the idea of turning to poop for data might seem desperate, the process is fairly high-tech: wastewater treatment facilities pump out small samples, which are then shipped to public and private labs for further examination.

At one such place, Biobot Analytics, technicians sift out the viral particles using nanoscale magnetic beads and then run them through a PCR machine—the same device used for the most accurate type of COVID testing. Algorithms parse the results, factoring in local wastewater flow rates and other viral markers, while filtering out the noisy outliers to produce a crystal-clear concentration of COVID-causing virus in each sample.

Using such processes, the CDC and Biobot have learned to polish once dirty data into a useful public resource that can accurately reflect disease trends. And over the past two years, the CDC and its partners have built up the network of local testing sites to track the sewage of more than a third of the country.

The monitoring system has given local public health officials and hospitals much needed insights into where to invest in increased testing and other health measures while helping ordinary citizens better understand when to take personal precautions.

The scientific testing techniques and reporting system have been so successful that the CDC is now aiming to expand its efforts to track other pathogens, such as flu viruses and salmonella, in hopes of responding more quickly to future regional outbreaks. According to Amy Kirby, program lead of NWSS, “If we have the system already in place, when the next pandemic hits, we’ll be ready to get data coming in within weeks.”