If police departments were graded by social media users the way a high school teacher grades homework, many of them would flunk or barely pass, according to a new analysis of public sentiment toward law enforcement on Twitter. The drug addiction resource organization DrugAbuse.com released Thursday a report card on municipal police forces based on highly-positive and highly-negative tweets transmitted in the first half of the year.

Using a series of tweeted keywords that commonly represent descriptions of law enforcement, the organization found that nearly half of Americans give their police department a “D” grade or a failing grade. The most positively rated state and city police departments were in New Hampshire and Columbus, Ohio. Arkansas and Ferguson, Missouri, had the most negatively rated state and city police, according to the report.

Unsurprisingly, DrugAbuse.com said in its analysis Twitter users had overwhelmingly negative things to say about Ferguson, where Darren Wilson, the former city police officer, killed Michael Brown, an unarmed black teen, one year ago this month. The organization acknowledged that its analysis of 766,000 tweets, transmitted between Jan. 1 and May 4, are weighted negative by events of the last year that have seen attitudes toward police grow increasingly hostile.

In other places where police conduct drew national publicity, sentiment was not ranked as negatively as analysts expected. That was true for Baltimore, where riots broke out after the April death of Freddie Gray, a 25-year-old African-American who sustained fatal injuries in police custody.

policesentiments1 The most negative views of police were tweeted by Twitter users in Arkansas, Idaho, Missouri, Virginia, and Georgia. Photo: DrugAbuse.com

policesentiments2 The most negative views were tweeted by Twitter users in three Texas cities, Los Angeles, and Ferguson, Missouri. Photo: DrugAbuse.com

“With more high-profile encounters serving as leading stories across news media recently, the number of opinions [about police] expressed by people on social media has exploded,” wrote the authors of the social media analysis. “It’s important to remember, however, that one’s perception of police relations and the actual effectiveness of law enforcement are two completely different things.”

Along with racially-charged police incidents, DrugAbuse.com also studied the tweets to determine how drug- and alcohol-related encounters with police shape public sentiment. The organization found that if a social media user is breaking the law, their opinion of police is more likely to be negative. Drug possession and drunk-driving are largely victimless crimes, when there is no injury to a third party. Therefore, “the more effective police are at their work, the wider the gap becomes between the number of perpetrators and victims, thus ensuring a negative sentiment toward law enforcement overall,” according to the analysis.