Editor's Note: This story was originally published in October and has been republished with updates in the wake of the shooting Wednesday in Florida.

It was the deadliest school shooting since a gunman took 26 lives at Sandy Hook Elementary in Newton, Conn. On Wednesday, a shooter killed at least 17 people at Marjory Stoneman Douglas High School in Parkland, Florida.

The Florida shooting is the latest reminder of the persistent gun violence in the United States. Rates of gun deaths in the U.S. are far greater than in much of the rest of the world.

Take countries with the top indicators of socioeconomic success — income per person and average education level, for instance. The United States ranks ninth in the world among them, bested only by the likes of Luxembourg, Denmark, Norway, the Netherlands, Iceland, Andorra, Canada and Finland.

Those countries all also enjoy low rates of gun violence, but the U.S. has the 31st highest rate in the world: 3.85 deaths due to gun violence per 100,000 people in 2016. That was eight times higher than the rate in Canada, which had .48 deaths per 100,000 people — and 27 times higher than the one in Denmark, which had .14 deaths per 100,000.

The numbers comes from a massive database maintained by the University of Washington's Institute for Health Metrics and Evaluation, which tracks lives lost in every country, in every year, by every possible cause of death. The 2016 figures, released last fall, paint a fairly rosy picture for much of the world, with deaths due to gun violence rare even in many countries that are extremely poor — such as Bangladesh and Laos, which saw .16 deaths and .13 deaths respectively per 100,000 people.

Prosperous Asian countries such as Singapore and Japan boast the absolute lowest rates, though the United Kingdom and Germany are in almost as good shape.

"It is a little surprising that a country like ours should have this level of gun violence," says Ali Mokdad, a professor of global health and epidemiology at the IHME. "If you compare us to other well-off countries, we really stand out."

To be sure, there are quite a few countries where gun violence is a substantially larger problem than in the United States — particularly in Central America and the Caribbean. Mokdad says a major driver is the large presence of gangs and drug trafficking. "The gangs and drug traffickers fight amongst themselves to get more territory, and they fight the police," says Mokdad. And citizens who are not involved are often caught in the crossfire.

Mokdad said drug trafficking may also be a driving factor in two Asian countries that have unusually large rates of violent gun deaths for their region: the Philippines and Thailand.

With the casualties due to armed conflicts factored out, even in conflict-ridden regions such as the Middle East, the U.S. rate is worse than in all but one country: Iraq.

The U.S. gun violence death rate is also higher than nearly all countries in sub-Saharan Africa, including many that are among the world's poorest.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.