In the past two years, deaths at the hands of police officers sparked protests, riots and a national conversation about how law enforcement uses force. That conversation would be a lot more productive, though, if data on police-involved fatalities were more reliable.

The U.S. Department of Justice collects lots of crime data but takes too long to publish them and misses roughly half of police-involved homicides, justified or not. After events in Ferguson, Mo., several other organizations stepped up to do the job, The Washington Post included. Other efforts included the “Fatal Encounters” project and the British newspaper the Guardian.

Tallies vary among these databases because of different methodologies. The Post counts 986 fatal shootings in 2015. The Guardian totals 1,138 because it includes deaths even vaguely related to police interaction.

These numbers do, for the first time, answer the simple but necessary question: “How many people die at the hands of police?”

Last month, the FBI finally announced plans to collect national data about police-involved shootings. Currently, local law enforcement agencies are asked to share basic information about homicides. But many simply do not. Whether new plans will improve on their current data collection abilities remain to be seen.

Even if there was 100 percent compliance, though, any new federal database must move beyond a simple body count to capture the context of shootings. The FBI says the new system will track the gender and race of officers and suspects, the level of danger officers faced, and the types of weapons wielded by police and suspects. That’s essential: To go beyond a collection of anecdotes, in order to know what policy solutions make sense, we need to know what happened in each shooting incident. Without this knowledge, researchers can only group deadly force encounters into crude categories such as race and jurisdiction.

Almost all police-involved shootings are considered legally justified. But beyond that question is a separate one of whether the use of deadly force was morally and tactically appropriate. Better data on this is needed to answer important questions as to how we are policed and when and if police should be held accountable for use of force.

The most important contextual categories address three issues: Are police targeting minorities for special attention? Do officers behave differently or use greater force when confronting a black suspect than a white one? Can we reduce the overall numbers of deadly force incidents?

Separating these issues is important. Behind the dry statistics and chilling tallies, there are human beings in each of these cases, on both sides of the gun. When people begin to look at police-involved killings with an ideological perspective — whether on one extreme, that all cops are racist or on the other, that whatever cops feel they have to do is justified — they tend to stop listening to constructive criticism.

Of the fatal shootings counted by The Post, the majority involved a suspect who had already fired shots, brandished a gun or attacked someone. Several occurred after other potentially dangerous threats. In other words, most shootings involved police acting correctly. Headlines tout the total number of those killed by police as if each is worrisome, but they could very well read, “Police thwart hundreds of potentially deadly attacks in 2015.”

Better context would help in examining the racial implications of police shootings, too. Most people killed by police last year as a raw number were white or Hispanic. But 40 percent of the unarmed people killed by police were black men, who only make up 6 percent of the nation’s population as a whole. To try to explain why the per-capita number of unarmed black men killed by police is so much higher than expected, we need data to help us have a more complete understanding of what happens in police shootings.

Consider Nicholas Johnson, sought on charges of a recent home invasion and robbery in Fontana, Calif. Johnson led police on a lunchtime chase through city streets at 100 miles per hour and ultimately drove the wrong way down a crowded freeway. A specially trained deputy shot Johnson from a police helicopter, but Johnson leaped from his moving vehicle, which then wrecked head-on with a car containing a family. The Guardian classifies Johnson — at the wheel of a 5,300-pound vehicle — as “unarmed” and thus, by implication, the police-involved homicide unjustified. We disagree.

That sort of information emerges only from contextual data. One of us is working on the independent, non-partisan “StreetCred Police Killings in Context” data set that also searches the Internet for media reports of police-involved killings. But StreetCred works hard to augment these data with situational data provided by official statements and documents, and we hope the Justice Department will follow suit.

StreetCred data reveal that citizens, not police, initiate most of the 72 percent of deadly encounters that don’t begin with traffic stops. About three-quarters of non-traffic stop deadly encounters began with a citizen’s call to 911. Twenty percent involved a citizen flagging down an officer. Moreover, in most of the emergency calls, the caller specifically identified or otherwise described the suspect who ultimately died.

Each call for service starts an uncertain process that usually ends well but has a small chance of ending in tragedy. At the very least, a 911 call brings a police officer’s gun and its potential use to the scene. Often shootings are portrayed solely as a “police problem,” when police are simply the last link in a long chain of events.

From a police perspective, the role of civilians in racial profiling is particularly problematic. The Post, for instance, found evidence that retail shop owners are more likely to view blacks as “suspicious.” But what happens when citizens are wrong? Police, by policy, have to respond to and investigate every call for service, and in doing so they become unwitting partners in citizens’ racism and discrimination. Perhaps police should be allowed to reprimand people who call for 911 for bad reasons. But imagine how that would go over in the evening news.

By collecting better and more complete data on deadly incidents, we can separate incidents in which police behave badly from those in which police were given bad information and both of those from situations in which police behave exactly as we hope they would, by using lethal force to save the lives of innocent people.

More from PostEverything: