Three weeks into his new job as commanding officer of Manhattan’s 20th precinct, Captain Timothy J. Malin stared at a map on his computer screen, puzzled. It showed his jurisdiction carved up by streets and parks, with the southern edge encased in an ominous shade of red.

For decades, the New York Police Department has used real-time statistics to chart spikes in violence and calibrate police activity across the city. This map, however, displayed not crime data but something new in the arsenal of police metrics: public approval. The crimson on Malin’s map indicated that some residents in his precinct, the Upper West Side—one of New York City’s wealthiest and safest neighborhoods—reported feeling little trust in his officers. It was Malin’s job to figure out why. “I look at that, and I am like, ‘Okay? What’s causing this?’” he said.

This story was published in partnership with The Marshall Project, an independent nonprofit newsroom covering the U.S. criminal justice system.

In April, the NYPD informally introduced its public opinion monitor, also known as the “sentiment meter,” during CompStat, the weekly meetings in which top brass interrogate precinct commanders about crime trends. Precincts now receive a monthly “trust score” along with rankings that measure overall satisfaction with police performance and how safe residents feel. The data is culled from questionnaires administered through about 50,000 smartphone apps, including Candy Crush and WeatherBug, as well as traditional landline calls. Facebook and Instagram began to advertise links to the surveys in June.

Since late 2016, the NYPD has been codeveloping the sentiment meter with Elucd, a Brooklyn-based startup. (Pronounced e-loo-cid, as in “elucidate”). It’s meant to help residents get more comfortable dealing with police, officials said. “Crime numbers in New York City now are at record lows,” said NYPD Police Commissioner James P. O'Neill. “If we are going to push those numbers down even further, we have to make sure that we have the trust of the 8.6 million people that live in New York City.”

In the age of viral police shootings, generating public trust of cops has become even more difficult. “The relationship between police and the communities they serve is at a crisis in many cities,” said Michael Simon, Elucd’s 37-year-old co-founder. “And they have no way of measuring what success is right now. It’s shocking.”

Simon headed Barack Obama’s data analytics team during the 2008 campaign, and his strategy, or “precision targeting,” helped identify pockets of undecided voters who were then courted by the candidate.

Karsten Moran for The Marshall Project

The NYPD approached Simon four years ago to see if he could measure what New Yorkers think about local officers. The partnership started out with a survey of 17,340 New Yorkers, but eventually the team of data experts built the sentiment meter. The police already use algorithms for tasks such as predicting who is likely to get shot and spotting threats on Twitter. Elucd is a tool to help cops get hold of the intangible: human feelings.