Click through the slideshow above for America's most violent (and most peaceful) states.

While violent crime rates in the country have fallen steadily over the past several decades, the United States is still one of the less peaceful nations in the world. According to the Global Peace Index 2015 report, the United States ranked 94th out of 162 countries. However, the peacefulness of American communities varies considerably within states.

Following the example of the Peace Index, 24/7 Wall St. generated an index to rank the peacefulness of each state in the nation. States with high violent crime and homicide rates, as well as high estimated small arms ownership and high incarceration rates were identified as less peaceful, while states with lower incidence of these factors were more peaceful. According to our index, Maine is the most peaceful state, while Louisiana is the least peaceful.

In an interview with 24/7 Wall St., Aubrey Fox, executive director of the U.S. office at the Institute of Economics and Peace, said, “A perfectly peaceful place would be a place where there is no violence and no fear of violence.” He explained this would be a place with no crime, no police spending, a strong government, and a healthy economy.

According to Fox, one of the largest drags on peacefulness in the country and in individual states has been the high levels of homicide and incarceration. Only three of the 10 least peaceful states had incarceration rates that did not exceed the national rate of 498.1 per 100,000 Americans. In all of the most peaceful states, incarceration rates were well below the national figure.

Less peaceful states needed to have relatively large police forces. The ratio of law enforcement employees to state residents exceeded the national proportion of 285.5 law enforcement workers per 100,000 Americans in eight of the 10 least peaceful states, while all of the most peaceful states had proportionately small police forces.

© 24/7 Wall St.

There are two ways to look at the relationship between peace and enforcement, Fox explained. While the perfectly peaceful community would have zero police officers, communities need to invest in policing to deal with local threats and lower crime. However, “There is typically a point at which you get less return on your investment,” Fox said.

Fox gave an example of a community with crime at a 50-year low, but where police are spending seven times as much to keep it that way. “We really need to ask how much of a lost opportunity cost is that?” Fox argued. In fact, U.S. crime levels are at their lowest level since 1972. Police spending was far lower at that time, however, according to Fox.

The connection is far from well-understood, however. Crime continued to drop in the U.S. during the most recent economic downturn, for example. During the downturn, police spending fell dramatically.

Still, economic costs add up the less peaceful a community becomes, and poor socioeconomic climates can lead to less peacefulness. “Being poor or having less access to resources does put you on a path that is less peaceful,” Fox said.

The manner in which these factors lead to violence, however, is very difficult to establish empirically. John Roman, senior fellow at the Urban Institute, an economic and social policy think tank, said, “The biggest predictor of whether there’s violence is dense clusters of unskilled young men.” He went on to explain that poor socioeconomic factors such as low educational attainment, high poverty rates, and high unemployment all lead to more violence by contributing to higher numbers of unskilled young males.

Visit 24/7 Wall St. for the complete list of states and methodology.

More from 24/7 Wall St.:

The Most (And Least) Expensive States to Drive

The 10 Jobs With the Best Job Security

9 States with the Most Dangerous Weather