Compiling more than 10,000 lines of data on the waste products of aquatic animals, from lake trout to pond insects to ocean shellfish, was more time-consuming than the ecologist Michael Vanni expected. But he didn’t mind. “I love data on fish pee,” he says.

Vanni, of Miami University in Ohio, and his coauthor, Peter McIntyre, of the University of Wisconsin, Madison, had plunged into the project for their own research. But they soon realized the giant dataset they put together could be a resource for other scientists, too—all that work on animal waste didn’t have to go to waste itself.

Why anyone cares about fish pee or frog pee or snail pee in the first place has to do with recycling. Nutrients in an ecosystem are used over and over again as they cycle through the food chain. In a forest, for example, when leaves fall to the ground, fungi and bacteria break them down and return their nutrients to the soil, where plants can use them again. Especially in aquatic environments, Vanni says, animals do a lot of this recycling. When fish excrete nitrogen and phosphorus, algae can take the molecules back up.

To understand this accounting for a given ecosystem, it would help to be able to look at any animal and predict how much recycling it’s doing. That’s what Vanni and McIntyre wanted to know: “Are there ways that we can predict how much nitrogen and phosphorus an animal will excrete?” Vanni says. “Are there general rules across all animal life?”

To answer the question, they gathered as much data as they could find on excretion by animals living in water, whether freshwater or ocean—in other words, anything peeing in the global pool.

Vanni says collecting these data for a small animal is pretty straightforward. You put the animal in a container of water, wait a given amount of time, then measure what it left behind. As long as you don’t stress the animal too much in the process—“You don’t want to literally scare the pee out of them”—you’ll get a decent idea of what it excretes.

(A word on poop: In fish, just as in mammals, some molecules from food enter the bloodstream and are later released in urine. Waste products that go all the way through the gut without ever being absorbed become feces. Different animals handle their waste streams differently; birds, for example, combine the two types. This study is about urine, more or less. Animals living in water are releasing it all the time. It’s harder to study feces, Vanni says, because—as the at-home scientist may have observed—animals don’t release it as predictably.)

Vanni and McIntyre contacted scientists who’d published studies about aquatic animal excretion and asked for their raw data. They ended up with data from about 100 sources, totaling 10,534 observations from around the world. Fish made up 36 percent of the observations, and 7 percent came from amphibians and reptiles. The remaining 57 percent came from invertebrates such as insects, crustaceans, mollusks, and worms. (Most water-dwelling mammals are too big to easily study this way; nothing in the dataset was much bigger than a few pounds.) Each observation included an animal’s species, size, habitat, water temperature, and position in the food chain.

With that information, the researchers found they could come “pretty close” to predicting an animal’s nitrogen and phosphorus excretion, Vanni says, without actually making it pee in a bucket.

But that’s far from the only question researchers might be able to answer with all this excretion data. Have closely related animals evolved similar excretion rates? Does the same species pee differently in different environments? Understanding how each creature affects the nutrients in its home could help researchers predict the effects of fishing, which weeds out larger animals, or climate change, which is expected to shrink body sizes. It could also help scientists deal with pest fish that recycle too many nutrients into the water, encouraging algal blooms.

“We wanted to put the data out there so people could use it, and we hope other people will write papers on this,” says Vanni, who notes that most of his research was funded by the NSF. He and McIntyre published their study about predicting animal excretion December 2016 in Ecology. The full dataset is available as a separate paper in the same journal, with everyone who shared data listed as a coauthor. “This is certainly the way science is going,” Vanni says: researchers building big datasets and making them available to others.

As much effort as he put into quality control for 10,000 points of pee data, he adds, “that’s nothing” compared to what other researchers are generating in fields like genomics. “It was just really refreshing to see how eager people were to share their data,” Vanni says—recycling their own nutrients, as it were, into the scientific ecosystem.