The debate here has focused on guns as the problem. Guns are not the problem, they are an expression of the problem. To quote the article: "The Economist stated that rapid urbanisation and inequalities in wealth distribution were some of the largest factors in violent crime, and as one of the most unequal countries on the planet, Brazil backs up this claim." I think this statement applies to Mexico and other Latin Am…
It didn't in Brazil. Since 2004, civilians can't carry their guns and the police makes it very hard for them to be able to have one in the first place, or to register them again when it's time to renew.
Here is a graph with the homicides in Brazil from 1996 to 2016: http://www.ipea.gov.br/atlasviolencia/dados-series/31 (click on "País", then scroll down to see the graph)