Every time a gunman goes on a shooting spree at a school, a church or a shopping mall, our shaken society is left asking: Why? And what can be done to stop the killing?

In the desperate search for answers, we run through the list of possibilities. A hate crime grounded in religious, racial or anti-immigrant bias. White supremacy. Social media influence. A relationship gone wrong. Bullying. And then there are reasons that often get the most attention, namely access to guns and mental illness.

A pair of Twin Cities professors weren't finding the kind of information they needed to answer the pressing questions about America's gun violence problem. They wisely developed a national shooter database, going deeper through social science to unlock keys to preventing mass shootings.

Hamline University Prof. Jillian Peterson, Metropolitan State University Prof. James Densley and a team of students studied at least 100 data points for every mass shooter in the United States since 1966. That's the year a shooter opened fire from a University of Texas tower and killed 14 people. There have been 171 mass shooters — and 1,239 people killed — since then.

The team studied mental illness history, criminal background and what shooters said or wrote in advance of their attacks.

One of their most important findings so far is that nearly all the shooters shared four characteristics: early childhood trauma and/or exposure to violence as young people; finding validation for their violence, either in person or online, including studying earlier shootings; a particular grievance or crisis point; and the means to carry out the attack, including access to firearms.

Peterson, who's a psychologist, and Densley, a sociologist, and their team have interviewed surviving mass shooters and used court records, witness accounts and news reports as part of the Violence Project, their nonpartisan think tank. With the help of a $300,000 grant from the U.S. Department of Justice they're gathering the data to develop intervention and prevention strategies. They use the federal definition of a mass shooting — incidents in which four or more people die (excluding the shooter) — for their research.

Peterson told an editorial writer that the goal is to "break down the myths" and come up with solutions based on "data vs. emotions."

"There's this idea that the person was mentally ill and just snapped," she said. "But our data show that for most, a lot of advance thought went into the event before it happened. There were signs indicating what they planned to do. … We asked some of these guys whether anything could have been done to prevent them from going through and they said yes."

She added their research shows that about 91% of K-12 school shooters are or were students at the schools they attacked. That means they've often been through the active-shooter drills themselves and can find ways around them — a data point that could lead to rethinking those drills.

Densley told a Star Tribune reporter that their findings have revealed "opportunities for intervention," adding, "What can we be doing in our workplaces, schools and communities to be providing resources and outreach to people in crisis?"

The Star Tribune Editorial Board has long argued that gathering and analyzing data is critical to understanding and solving America's gun violence problem. We've noted that the complexity of the issue calls for more research and more comprehensive analysis.

The database that Peterson and Densley are freely sharing — and the training they offer — can help prevent gun violence and save lives. The initiative merits widespread support.