I stand corrected.
I will point out that NYC is 10th, from a selected list of 50. The reality is that probably all large cities in Japan, Norway, Switzerland, Sweden, and most in Australia, Canada and New Zealand are safer than NYC. There are probably over 100 cities that are safer but were simply were not used by The Economist for this study.
But that should not take away from the remarkable story that is NYC's transformation from 70's horrorshow to what is by far and away the safest & best big city in the USA. And not coincidentally, the big city with the tightest gun control for the past 20+ years.
Yes, there are about 50,000 cities in the world. The Economist chose to look at 50. If you "scaled up" the result and said that NY was the 10,000th safest city in the world, that might not sound like much to boast about. 2 cities from Australia; 6th and 9th. Every
city in Australia is safer than NY. What's more, NY's rating is lifted by strong ratings in non-traditional measures such as "digital security". On the measure that first comes to mind for most people; "Personal security" NY rates 28 out of 50. Again, not much to boast about.
It is true that NY is remarkably different from the 1970s-80s. I remember when Australian "60 minutes" interviewed NY mayor Ed Koch back in around 1979. At the time the number of murders in NY city was about 3 times the number for our entire country. Koch was asked if he was embarrassed that there were parts of the city that "belonged" to criminals; even police knew better than to go there. Koch's answer was "Meh, I'm sure that's true of any city". Er, NO! The breakdown of the rule of law is not OK anywhere in a developed country.
NY actually got worse (with the crack epidemic) before it got better, but it's now about 80% lower than its peak. (Still higher than my whole f'ing country, but no longer 3 times higher, so there's that). How much can de Blasio be credited for though? It's a long-term trend from about 1990, thanks largely to zero tolerance (broken windows) policies, Roe v Wade, and gun control, none of which he initiated.