The only window into our mysterious inner menagerie is poop. And that’s not an easy thing to track.

“I vividly remember the first time I did it because it smelled really bad,” David, now an assistant professor of molecular genetics and microbiology at Duke University, says about the sample collection process. “I didn’t think I was going to make it through the full year after the first day—I almost threw up.” Eventually he got used to the smells, but the endeavor was far from easy. “It was tiring,” he says.

The reign of smart technology coupled with the decreasing cost of DNA sequencing used to identify the microbes made this Magic School Bus venture possible. Using a tracking app called TapForm, which David customized for the project, the duo recorded everything they did and ate every day plus their weight and moods. “The idea was that you were going to carry [the iPad] with you all day and enter things you were doing into it as you were doing them because otherwise you could forget what you did,” David recalls, adding that their records were very detailed. “It was like, I ate a salad with a slice of tomato in it and some ham, and a bag of chips.” In essence, they wanted to capture everything that went in and everything that came out. At the end, they batch-processed over 700 samples, spent another year analyzing data, and finally published their findings in the Journal of Genome Biology this summer.

Alm and David discovered that their microbiomes were comprised of different bacterial species, but remained fairly stable on a day to day basis. Eating yogurt, which contain Bifidobacteriales, unsurprisingly increased those species. Eating fiber-rich foods increased Bifidobacteria, Roseburia, and Eubacterium rectale species, known to thrive on fiber. But while the pair’s microbial communities were generally stable over the course of the year, a handful of distinct activities changed their findings quickly and profoundly.

About three months into the experiment, David spent a few weeks in Bangkok, where he was struck by diarrhea. None of his bowel movements went to waste because he brought a bunch of hat devices and test tubes on the trip. He shipped the tubes home on dry ice, which required loads of paperwork and money. “It was incredibly expensive,” he recalls. “It cost about $1,200 for three to five pounds.” Afterwards, when the samples were processed and graphs were built, he learned that during his Thailand visit, the number of his Bacteroidetes doubled compared to his Firmicutes—but the changes reversed themselves two weeks after he came home.

Alm’s experience was different. Halfway through the project, he ate a French toast contaminated with salmonella. His diarrhea was so severe that he ended up in an emergency room with an IV. That episode caused many of his bacterial species to dwindle permanently. Unlike David’s Firmicutes, they didn’t come back, but were replaced by similar species, as the graphs showed. (The graphs also showed exactly when he contracted Salmonella and when it finally disappeared from his gut.)