Diego Valle-Jones's Bloghttps://blog.diegovalle.net/2015-08-24T00:00:00+02:00Up-to-date Crime Information2015-08-24T00:00:00+02:00Diego Valle-Jonestag:blog.diegovalle.net,2015-08-24:2015/08/up-to-date-crime-information.html<p><a href="https://elcri.men/en/">
<img alt="Hexbin of Mexico Crime Rates" class="image-process-article-image" src="/images/posts/up-to-date-crime-information/derivatives/article-image/homepage.png"/>
</a></p>
<p>Each month the Secretariado Ejecutivo del Sistema Nacional de Seguridad Pública publishes crime information on its website. The <a href="https://elcri.men/en/">crimenmexico</a> website downloads, processes the data, and presents it in an easy to interpret format. Even better, there’s also a Spanich version at <a href="https://elcri.men/">https://elcri.men/</a>
Besides the really cool interactive hexbin map on the homepage you can:</p>
<p><strong>View a time series of crimes by state</strong></p>
<p><a href="https://elcri.men/en/states.html">
<img alt="Crime by State" class="image-process-article-image" src="/images/posts/up-to-date-crime-information/derivatives/article-image/states.png"/>
</a></p>
<p><strong>View an interactive map that lets you filter by homicide rate</strong></p>
<p><a href="https://elcri.men/en/municipios-map.html">
<img alt="Municipio map" class="image-process-article-image" src="/images/posts/up-to-date-crime-information/derivatives/article-image/municipio-map.png"/>
</a></p>
<p><strong>View a time series of crimes in the most important municipios of Mexico</strong></p>
<p><a href="https://elcri.men/en/municipios.html">
<img alt="Crime by municipio" class="image-process-article-image" src="/images/posts/up-to-date-crime-information/derivatives/article-image/municipios.png"/>
</a></p>
<p><strong>Detect municipios with an unusual number of crimes</strong></p>
<p><a href="https://elcri.men/en/anomalies.html">
<img alt="Crime anomalies" class="image-process-article-image" src="/images/posts/up-to-date-crime-information/derivatives/article-image/anomalies.png"/>
</a></p>
<p><strong>View <a href="https://elcri.men/en/infographics.html">infographics</a></strong></p>
<p><a href="/images/posts/up-to-date-crime-information/infographic_jul_2015.png">
<img alt="Infographic" class="image-process-article-image" src="/images/posts/up-to-date-crime-information/derivatives/article-image/infographic_jul_2015.png"/>
</a></p>
<p><a href="/images/posts/up-to-date-crime-information/municipios_jul_2015.png">
<img alt="Infographic" class="image-process-article-image" src="/images/posts/up-to-date-crime-information/derivatives/article-image/municipios_jul_2015.png"/>
</a></p>
<p>I plan to update the data each month, hopefully the <span class="caps">SNSP</span> won’t change
the download format anymore.</p>Municipios with missing persons anomalies2015-03-26T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2015-03-26:2015/03/municipios-with-missing-persons.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-WSrm4l94k3E_VRQanTnSNfI_AAAAAAAAJIU_0xKru0c_ofc_s1600_map.png" imageanchor="1" ><img border="0" height="258" src="/images/blogger_images/2.bp.blogspot.com_-WSrm4l94k3E_VRQanTnSNfI_AAAAAAAAJIU_0xKru0c_ofc_s1600_map.png" width="320"/></a></div>
<br/>
The <i>Secretaría de Gobernación</i> just updated the missing persons database (<a href="https://rnped.segob.gob.mx/"><span class="caps">RNPED</span></a>) to include data up to January 2015. The database now contains information on 25,293 missing persons from the *fuero común* (local government) and 443 from the *fuero federal* (federal government).<br/>
<a name="more"></a><br/>
To make it easier to understand the data and make it actionable, I plotted all the municipios containing outliers during the period from August 2014 (just before the mass kidnapping in Ayotzinapa) to January 2015 (the last date available). The chart includes data from both the fuero federal and común.<br/>
<br/>
I used the <a href="https://github.com/twitter/AnomalyDetection">AnomalyDetection</a> R package to detect the anomalies.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-yKB1MYCcrIQ_VRN3g1cD29I_AAAAAAAAJIA_7EMwZPrbD7k_s1600_sm.png" imageanchor="1" ><img border="0" height="263" src="/images/blogger_images/2.bp.blogspot.com_-yKB1MYCcrIQ_VRN3g1cD29I_AAAAAAAAJIA_7EMwZPrbD7k_s1600_sm.png" width="400"/></a></div>
<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
Not surprisingly, Iguala, which saw the disappearance of 43 students on September 26, 2014 appears first on the list. The Mexican government should pay particular attention to these <i>municipios</i> if it wants to solve the missing persons problem in Mexico.<br/>
<br/>
This is a cartogram of the rates of disappearances at the state level. Obviously, some states like Guerrero and Nayarit (zero disappearances in 2014) under report disappearances.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-PDHFngmq6Ys_VRNyI0oFiVI_AAAAAAAAJHo_ZPkwbjoXWXI_s1600_cartogram.png" imageanchor="1" ><img border="0" height="400" src="/images/blogger_images/1.bp.blogspot.com_-PDHFngmq6Ys_VRNyI0oFiVI_AAAAAAAAJHo_ZPkwbjoXWXI_s1600_cartogram.png" width="330"/></a></div>
<br/>
<span class="caps">P.S.</span> Code is available <a href="https://github.com/diegovalle/rnped">here</a>
<div style="clear: both;"></div>
</div>The 74 most violent cities in Mexico (2013)2015-01-14T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2015-01-14:2015/01/the-74-most-violent-cities-in-mexico.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-MRLIYf2Wako_VLXlXyLqPKI_AAAAAAAAIzc_5GbtAkFZ1Uc_s1600_change2012-2013.png" imageanchor="1" ><img border="0" height="640" src="/images/blogger_images/1.bp.blogspot.com_-MRLIYf2Wako_VLXlXyLqPKI_AAAAAAAAIzc_5GbtAkFZ1Uc_s1600_change2012-2013.png" width="481"/></a></div>
I’ve updated the <a href="https://github.com/diegovalle/mxmortalitydb">mxmortalitydb</a> package to include 2013 data. This data only package includes all injury intent deaths (accidents, homicides, suicides, and unspcified intent) that were registered in Mexico from 2004 to 2013. You can use the package to calculate changes and trends in homicide rates in the most violent metro areas (or large municipios) or at the national level.<br/>
<a name="more"></a><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-k5Slsj78fPU_VLXopC_wBxI_AAAAAAAAI0I_EPG9M3y3wfk_s1600_unnamed-chunk-4-1.png" imageanchor="1" ><img border="0" height="213" src="/images/blogger_images/1.bp.blogspot.com_-k5Slsj78fPU_VLXopC_wBxI_AAAAAAAAI0I_EPG9M3y3wfk_s1600_unnamed-chunk-4-1.png" width="320"/></a></div>
<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
You can also use the package to explore the deaths whose intent was left unspecified (note the large increase in firearm deaths in 2011, the year Mexico had the highest homicide rate in recent history)<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-G-1Ee56oeZ4_VLXlhvwiIjI_AAAAAAAAIzs_EpcDIGLcbO8_s1600_unnamed-chunk-4-2.png" imageanchor="1" ><img border="0" height="266" src="/images/blogger_images/4.bp.blogspot.com_-G-1Ee56oeZ4_VLXlhvwiIjI_AAAAAAAAIzs_EpcDIGLcbO8_s1600_unnamed-chunk-4-2.png" width="400"/></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
And make pretty plots of the most violent metro areas or large municipios which are not part of a metro area (in Mexico by definition a metro area has to consist of more than one municipio, so it is worthwhile to include single municipios with large populations). I should also note that the database only includes deaths where a death certificate was issued, so if there are clandestine mass graves that haven’t been found (as was the case recently in Iguala) or where the deaths somehow were not registered (as was the case with the Taxco mass grave) then the deaths are not included in the counts.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-MRLIYf2Wako_VLXlXyLqPKI_AAAAAAAAIzc_5GbtAkFZ1Uc_s1600_change2012-2013.png" imageanchor="1" ><img border="0" height="640" src="/images/blogger_images/1.bp.blogspot.com_-MRLIYf2Wako_VLXlXyLqPKI_AAAAAAAAIzc_5GbtAkFZ1Uc_s1600_change2012-2013.png" width="481"/></a></div>
While violence has decreased in recent years it still has a long way to drop before it reaches the levels seen in 2006.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-RW4kPfwWfYU_VLXlxuE9brI_AAAAAAAAIz8_4iLCGw84fs4_s1600_change2006-2013.png" imageanchor="1" ><img border="0" height="640" src="/images/blogger_images/4.bp.blogspot.com_-RW4kPfwWfYU_VLXlxuE9brI_AAAAAAAAIz8_4iLCGw84fs4_s1600_change2006-2013.png" width="482"/></a></div>
Note the mixed trend in Michoacán.<br/>
<br/>
Do note that the charts of homicides from 2006 were made with the 2010 population according to the <span class="caps">CONAPO</span>, so the homicide rate was underestimated by a little bit. Also, rather than using the raw homicide numbers I adjusted them by classifying deaths of unknown intent as described in the <a href="https://github.com/diegovalle/mxmortalitydb">mxmortalitydb package</a> and this <a href="http://blog.diegovalle.net/2012/12/mexicos-drug-war-63000-extra-deaths-in.html">post</a>.<br/>
<div>
<br/></div>
<div>
The code for generating the charts is available from <a href="https://gist.github.com/diegovalle/f6275ac1aa83e0a7d9e3">GitHub</a></div>
<div style="clear: both;"></div>
</div>Important notice regarding crimenmexico2014-09-25T00:00:00+02:00Diego Valle-Jonestag:blog.diegovalle.net,2014-09-25:2014/09/important-notice-regarding-crimenmexico.html<div class="post-body entry-content" itemprop="articleBody">
The website from which <a href="https://elcri.men/">crimenmexico</a> downloads crime information hasn’t been responding for quite a while now. The <span class="caps">SESNSP</span> server’s uptime has never been good but it has never stayed down for so long.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-REBmOYTs0Rg_VCN02fOOonI_AAAAAAAAHVE_z4atf3nxccI_s1600_uptime.png" imageanchor="1" ><img border="0" height="221" src="/images/blogger_images/2.bp.blogspot.com_-REBmOYTs0Rg_VCN02fOOonI_AAAAAAAAHVE_z4atf3nxccI_s1600_uptime.png" width="400"/></a></div>
which I guess means that <i>Secretariado Ejecutivo del Sistema Nacional de Seguridad Pública</i> has suspended its open data policy of providing crime information. Apparently crime info is now only downloadable from a couple of <a href="http://www.secretariadoejecutivo.gob.mx/es/SecretariadoEjecutivo/09121420">zip files</a>, but <span class="caps">SESNSP</span> made sure to:<span id="goog_1246066625"></span><br/>
<ul>
<li>Change the names of the crimes to include whitespace at the end (e.g “<span class="caps">ROBOS</span>” to “<span class="caps">ROBOS</span> ”)</li>
<li>Not include the <span class="caps">INEGI</span> code for each state and municipality, thus making it really difficult to merge with other data</li>
<li>Spell state names both with and without accents (YUCATÁN and <span class="caps">YUCATAN</span>)</li>
<li>Include subtotals (e.g. total crimes with violence) at the municipality level but not at the state level</li>
<li>Change the file format from csv to xlsx (Excel)</li>
</ul>
It’s almost as if they didn’t want anyone analyzing the data. It used to be that <a href="https://elcri.men/es/">crimenmexico</a> processed all the information in an automatic manner and made new data available immediately, but with these changes that has become impossible (I’m betting next month there will be more changes). There will now be a delay of a few weeks or so while I figure how to process the data.<br/>
<br/>
At the <a href="http://secretariadoejecutivo.gob.mx/incidencia-delictiva/incidencia-delictiva-fuero-comun.php">webpage for downloading the crime information</a> the <span class="caps">SESNSP</span> claims that [emphasis added]:<br/>
<div>
<blockquote class="tr_bq">
La presentación de los datos sobre incidencia delictiva en este portal electrónico obedece a los principios de acceso a la información y transparencia y a la<b> adopción de las mejores prácticas internacionales en gobierno abierto</b>.</blockquote>
If you disagree you can contact the <span class="caps">SESNSP</span> at: <a href="mailto:cni@secretariadoejecutivo.gob.mx">cni@secretariadoejecutivo.gob.mx</a></div>
<div style="clear: both;"></div>
</div>Interactive map of the drug war in Mexico - 20122014-01-07T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2014-01-07:2014/01/interactive-map-of-drug-war-in-mexico-2014.html<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.diegovalle.net/narcomap" imageanchor="1"><img border="0" src="/images/blogger_images/2.bp.blogspot.com_-y5RwP2K6PoQ_UstuYtWXYOI_AAAAAAAAGjs_qXHtaJTjALI_s1600_Map+of+the+Drug+War+in+Mexico+(18).png" height="251" width="400" /></a></div>
<p>It’s that time of the year again when I update the <a href="http://www.diegovalle.net/narcomap">interactive map of the drug war in Mexico</a>. The map now uses 30 day months to calculate homicide rates and the new <span class="caps">CONAPO</span> population estimates. As usual there is also a <a href="http://www.diegovalle.net/narcomapa">Spanish version</a>. All deaths registered without a date of occurrence were assumed to have occurred in the same month they were registered and all deaths without a municipio of occurrence were assumed to have taken place where they were registered. Various events are worth checking out:
<!--more-->
<ul>
<li><a href="http://www.diegovalle.net/narcomap#city=Polygon&start=2012-01-15&end=2012-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375&statadj=true&names=false&polygon=-102.9638671875+23.725011735951796%2C-103.5791015625+22.350075806124867%2C-102.65625+21.69826549685252%2C-101.6015625+22.998851594142923%2C-102.9638671875+23.725011735951796">Zacatecas/Fresnillo</a></li>
<li><a href="http://www.diegovalle.net/narcomap#city=Nuevo+Laredo&start=2012-01-15&end=2012-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375&statadj=true&names=false">The increase in violence in Nuevo Laredo</a>, which proved to be much <a href="http://www.lmtonline.com/articles/2012/09/17/front/news/doc5057dd74c282f329288134.txt">worse than thought </a></li>
<li><a href="http://www.diegovalle.net/narcomap#city=San+Fernando%2C+Tamps&start=2012-01-15&end=2012-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375&statadj=true&names=false">San Fernando</a></li>
<li><a href="http://www.diegovalle.net/narcomap#city=Polygon&start=2012-01-15&end=2012-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=7&homtype=INEGI&clat=20.74954939679734&clong=-100.5479736328125&statadj=true&names=true&polygon=-103.20556640625+20.117839630491634%2C-102.908935546875+19.818390093844958%2C-102.052001953125+20.29311344754411%2C-102.1728515625+20.68418377935239%2C-103.20556640625+20.117839630491634">The Michoacán/Jalisco border</a> (where a mass grave with over 60 bodies was recently found)</li>
<li><a href="http://www.diegovalle.net/narcomap#city=Polygon&start=2012-01-15&end=2012-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375&statadj=true&names=false&polygon=-118.0810546875+33.7243396617476%2C-119.1796875+31.541089879585808%2C-107.2705078125+29.764377375163125%2C-103.7548828125+28.69058765425071%2C-103.359375+32.99023555965106%2C-118.0810546875+33.7243396617476">Western border</a> vs <a href="http://www.diegovalle.net/narcomap#city=Polygon&start=2012-01-15&end=2012-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375&statadj=true&names=false&polygon=-101.4697265625+30.14512718337613%2C-102.392578125+28.536274512989912%2C-98.5693359375+24.44714958973082%2C-96.416015625+24.287026865376447%2C-95.9765625+26.58852714730864%2C-101.4697265625+30.14512718337613">Eastern border</a></li>
<li>More bodies from the <a href="http://www.diegovalle.net/narcomap#city=Durango%2C+Dgo&start=2012-01-15&end=2012-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375&statadj=true&names=false">Durango mass grave</a>s that apparently were not reported</li>
<li><a href="http://www.diegovalle.net/narcomap#city=All+of+M%C3%A9xico&start=2006-12-15&end=2012-11-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375&statadj=false&names=false">Homicides for the whole sexenio</a></li>
</ul>
For the adjusted homicide data I did the following:</p>
<p>I again classified all deaths of unknown intent into accidents, suicides and homicides based on the age, sex of the victim and injury mechanism by which the death occurred. The method I used is similar to the one I used in my <a href="http://blog.diegovalle.net/2012/07/machine-learning-for-better-homicide.html">Juarez post</a> (with a penalized regression for Sinaloa and knn for the rest of Mexico). For example, if someone told you to guess the intent of the death of a 70 year old woman who died in Merida by motor vehicle, you’d probably guess it was an accident. If you had to guess the intent of the death of a young male in Acapulco who died by firearm, you’d probably think it was an homicide.
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-U_plDPotY5Y_UrYzp_RrKXI_AAAAAAAAGjY_yNEk_zOIpRE_s1600_sen-spe.png" imageanchor="1" ><br class="Apple-interchange-newline" /><img border="0" src="/images/blogger_images/4.bp.blogspot.com_-U_plDPotY5Y_UrYzp_RrKXI_AAAAAAAAGjY_yNEk_zOIpRE_s1600_sen-spe.png" height="346" width="400" /></a></div></p>
<div>
</div>
<p>I also recoded all deaths by legal intervention as homicides in the adjusted version since it seems legal intervention deaths are not always classified correctly (the <a href="http://mexico.cnn.com/nacional/2010/09/16/al-menos-19-personas-mueren-en-enfrentamientos-en-nl-y-tamaulipas">19 deaths from the shootout</a> between the army and the narcos in <a href="http://www.diegovalle.net/mapa-guerra-narco.html#city=Polygon&start=2010-01-15&end=2010-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=9&homtype=INEGI&clat=26.050476281176586&clong=-98.817626953125&statadj=false&names=true&polygon=-99.5965576171875+26.256472923285344%2C-99.4427490234375+26.148041726002866%2C-99.06097412109375+26.44844313751643%2C-99.13787841796875+26.539394329017032%2C-99.5965576171875+26.256472923285344">General Treviño and Mier were recorded as homicides</a>).</p>
<p>The problems with the data in the <a href="http://blog.diegovalle.net/2012/09/more-errors-in-mexican-mortality.html">Federal District</a> and <a href="http://blog.diegovalle.net/2012/12/how-mexican-state-ended-up-with-more.html">Sinaloa</a> were also corrected.</p>
<p>Since firearm accidents in Baja California went from 6 in 2006 to a 100 in 2007 and again to 6 in 2008 I reclassified all firearm accidents as if their intent were unknown in 2007.</p>
<p>I also added the mass grave in Taxco and the one in San Fernando since they either don’t appear or are incomplete in the dataset from the <span class="caps">INEGI</span>.</p>
<p><span class="caps">P.S.</span> You can download a csv with the data from the <a href="http://www.diegovalle.net/projects.html#url=%23datasets">projects page</a> </p>Changes in homicide rates2013-12-18T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2013-12-18:2013/12/changes-in-homicide-rates.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-Ss28AOrxjlM_UrEPajK4ieI_AAAAAAAAGfo_Y7-ccrj1tFk_s1600_change2011-2012.png" imageanchor="1" ><img border="0" height="640" src="/images/blogger_images/1.bp.blogspot.com_-Ss28AOrxjlM_UrEPajK4ieI_AAAAAAAAGfo_Y7-ccrj1tFk_s640_change2011-2012.png" width="532"/></a></div>
More examples of using the <a href="https://github.com/diegovalle/mxmortalitydb">mxmortalitydb</a> package! Changes and trends in homicide rates in the most violent metro areas or big municipios. There was a big increase in violence in Nuevo Laredo. For comparison the homicide rate in Chicago (metro area) was 8.2.<br/>
<style>
pre {overflow-x:hidden;padding:0;}
</style><br/>
<div class="markdown-here-wrapper" data-md-original="%3Cp%3ELook%2C%20another%20example%20of%20using%20the%20%5Bmxmortalitydb%5D(https%3A%2F%2Fgithub.com%2Fdiegovalle%2Fmxmortalitydb)%20package!%20Changes%20and%20trend%20in%20homicide%20rates%20in%20the%20most%20violent%20metro%20areas%20or%20big%20municipios%20(note%20the%20log%20scales).%20For%20comparison%20the%20homicide%20rate%20in%20Chicago%20(metro%20area)%20was%208.2%3Cbr%3E%3Cbr%3E%3Cbr%3E%60%60%60r%3Cbr%3Elibrary(mxmortalitydb)%3Cbr%3Elibrary(stringr)%3Cbr%3Elibrary(plyr)%3Cbr%3Elibrary(ggplot2)%3Cbr%3Elibrary(grid)%26nbsp%3B%20%23%23%20needed%20for%20arrow%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E%3Cbr%3E%3Cbr%3E%60%60%60r%3Cbr%3EplotMetro%20%26lt%3B-%20function(metro.name%2C%20metro.areas)%20%7B%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Plot%20the%20homicide%20counts%20in%20a%20metro%20area%20or%20municipio%20metro.name%20-%20name%20of%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20the%20metro%20area%20to%20plot%20metro.areas%20-%20data%20frame%20containing%20a%20list%20of%20metro%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20areas%20in%20the%20same%20format%20as%20the%20metro.area%20dataframe%20from%20mxmortalitydb%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20data.frame%20metro.areas%20contains%20the%202010%20CONAPO%20metro%20areas%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df%20%26lt%3B-%20merge(injury.intent%2C%20metro.areas%2C%20by.x%20%3D%20c(%22state_reg%22%2C%20%22mun_reg%22)%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20by.y%20%3D%20c(%22state_code%22%2C%20%22mun_code%22))%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Yearly%20homicides%20in%20Mexico%20City%2C%20by%20state%20of%20registration%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df2%20%26lt%3B-%20ddply(subset(df%2C%20metro_area%20%3D%3D%20metro.name%20%26amp%3B%20intent.imputed%20%3D%3D%20%22Homicide%22)%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.(year_reg)%2C%20summarise%2C%20count%20%3D%20length(state_reg))%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ggplot(df2%2C%20aes(year_reg%2C%20count))%20%2B%20geom_line()%20%2B%20labs(title%20%3D%20str_c(%22Homicides%20(plus%20deaths%20of%20unknown%20intent%20classified%20as%20homicide)%20in%5Cn%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20metro.name))%20%2B%20ylim(0%2C%20max(df2%24count))%20%2B%20ylab(%22homicide%20count%22)%20%2B%20xlab(%22year%20of%20registration%22)%20%2B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20theme_bw()%3Cbr%3E%7D%3Cbr%3E%3Cbr%3EplotChanges%20%26lt%3B-%20function(df%2C%20metro.areas%2C%20country.rate%2C%20years)%20%7B%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Plot%20of%20rates%20and%20trends%20df%20-%20injury.intent%20dataframr%20metro.areas%20-%20data%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20frame%20containing%20a%20list%20of%20metro%20areas%20in%20the%20same%20format%20as%20the%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20metro.area%20dataframe%20from%20mxmortalitydb%20country.rate%20-%20rate%20to%20show%20as%20a%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20gray%20dotted%20line%20years%20-%20start%20and%20end%20year%20to%20compare%20changes%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Where%20the%20municipio%20where%20the%20death%20occurred%20is%20unknown%20use%20the%20municipio%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20where%20it%20was%20registered%20as%20place%20of%20occurrance%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df%5Bdf%24mun_occur_death%20%3D%3D%20999%2C%20%5D%24mun_occur_death%20%26lt%3B-%20df%5Bdf%24mun_occur_death%20%3D%3D%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20999%2C%20%5D%24mun_reg%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Counts%20of%20homicide%20by%20state%20and%20municipio%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df%20%26lt%3B-%20ddply(subset(df%2C%20year_reg%20%25in%25%20years%20%26amp%3B%20intent.imputed%20%3D%3D%20%22Homicide%22)%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.(state_occur_death%2C%20mun_occur_death%2C%20year_reg)%2C%20summarise%2C%20count%20%3D%20length(state_reg))%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Merge%20the%20counts%20with%20our%20fake%20metro%20areas%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df%20%26lt%3B-%20merge(df%2C%20metro.areas%2C%20by.x%20%3D%20c(%22state_occur_death%22%2C%20%22mun_occur_death%22)%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20by.y%20%3D%20c(%22state_code%22%2C%20%22mun_code%22))%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Now%20get%20the%20counts%20by%20metro%20area%20(which%20may%20contain%20more%20than%20one%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20municipio)%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df%20%26lt%3B-%20ddply(df%2C%20.(metro_area%2C%20year_reg)%2C%20summarise%2C%20count%20%3D%20sum(count)%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20population%20%3D%20sum(mun_population_2010)%2C%20rate%20%3D%20count%2Fpopulation%20*%2010%5E5)%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20We%20are%20only%20interesed%20if%20the%20metro%20area%20at%20some%20time%20had%20a%20homicide%20rate%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20of%20at%20least%2015%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df%20%26lt%3B-%20subset(df%2C%20metro_area%20%25in%25%20subset(df%2C%20rate%20%26gt%3B%2015)%24metro_area)%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Make%20sure%20the%20dataframe%20is%20ordered%20by%20metro%20and%20year%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df%20%26lt%3B-%20df%5Border(df%24metro_area%2C%20df%24year_reg)%2C%20%5D%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Order%20the%20chart%20by%20homicide%20rate%20in%202012%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20df%24metro_area%20%26lt%3B-%20reorder(df%24metro_area%2C%20df%24rate%2C%20function(x)%20x%5B%5B2%5D%5D)%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23%23%20Data%20frame%20for%20the%20arrow%20structure%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20arrows%20%26lt%3B-%20ddply(df%2C%20.(metro_area)%2C%20summarise%2C%20start%20%3D%20rate%5B1%5D%2C%20end%20%3D%20rate%5B2%5D%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20metro_area%20%3D%20metro_area%5B1%5D%2C%20change%20%3D%20ifelse(rate%5B1%5D%20%26gt%3B%3D%20rate%5B2%5D%2C%20%22decrease%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22increase%22))%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ggplot(df%2C%20aes(rate%2C%20metro_area%2C%20group%20%3D%20as.factor(year_reg)%2C%20color%20%3D%20as.factor(year_reg)))%20%2B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20geom_point(aes(size%20%3D%20log(count)))%20%2B%20labs(title%20%3D%20%22Homicide%20(plus%20deaths%20of%20unknown%20intent%20classified%20as%20homicide)%20rates%20and%20trends%22)%20%2B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20scale_size(%22number%5Cnof%5Cnhomicides%22%2C%20breaks%20%3D%20c(log(50)%2C%20log(500)%2C%20log(3000))%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20labels%20%3D%20c(50%2C%20500%2C%203000))%20%2B%20geom_segment(data%20%3D%20arrows%2C%20aes(x%20%3D%20start%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20y%20%3D%20metro_area%2C%20xend%20%3D%20end%2C%20yend%20%3D%20metro_area%2C%20group%20%3D%20change%2C%20color%20%3D%20change)%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20arrow%20%3D%20arrow(length%20%3D%20unit(0.3%2C%20%22cm%22))%2C%20alpha%20%3D%200.8)%20%2B%20scale_color_manual(%22year%5Cnand%5Cntrend%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20values%20%3D%20c(%22gray%22%2C%20%22black%22%2C%20%22blue%22%2C%20%22red%22))%20%2B%20ylab(%22metro%20area%20or%20municipio%22)%20%2B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20xlab(%22homicide%20rate%22)%20%2B%20%23%20scale_x_log10()%2B%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20geom_vline(xintercept%20%3D%20country.rate%2C%20linetype%20%3D%202%2C%20color%20%3D%20%22%23666666%22)%20%2B%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20annotate(%22text%22%2C%20y%20%3D%20%22Tapachula%22%2C%20x%20%3D%2025%2C%20label%20%3D%20%22country%5Cnaverage%5Cn2012%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20hjust%20%3D%20-0.1%2C%20size%20%3D%204%2C%20color%20%3D%20%22%23666666%22)%20%2B%20theme_bw()%3Cbr%3E%7D%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E%3Cbr%3E%3Cbr%3E%60%60%60r%3Cbr%3E%23%23%20Let's%20treat%20the%20big%20municipalities%20which%20are%20not%20part%20of%20a%20metro%20area%20as%3Cbr%3E%23%23%20if%20they%20were%20one%20rename%20big.municipios%20to%20merge%20with%20metro.areas%3Cbr%3Ebig.municipios2%20%26lt%3B-%20big.municipios%3Cbr%3Enames(big.municipios2)%20%26lt%3B-%20c(%22state_code%22%2C%20%22mun_code%22%2C%20%22mun_population_2010%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22metro_area%22)%3Cbr%3Emetro.areas.fake%20%26lt%3B-%20rbind.fill(metro.areas%2C%20big.municipios2)%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E%3Cbr%3EAnd%20changes%20from%202006%20to%202012%3A%3Cbr%3E%3Cbr%3E%3Cbr%3E%60%60%60r%3Cbr%3EplotChanges(injury.intent%2C%20metro.areas.fake%2C%2024.5%2C%20c(2011%2C%202012))%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-4%5D(figure%2Funnamed-chunk-41.png)%20%3Cbr%3E%3Cbr%3E%60%60%60r%3Cbr%3Eggsave(%22change2011-2012.svg%22%2C%20dpi%20%3D%20100%2C%20width%20%3D%208%2C%20height%20%3D%209.6)%3Cbr%3EplotChanges(injury.intent%2C%20metro.areas.fake%2C%2024.5%2C%20c(2006%2C%202012))%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-4%5D(figure%2Funnamed-chunk-42.png)%20%3Cbr%3E%3Cbr%3E%60%60%60r%3Cbr%3Eggsave(%22change2006-2012.svg%22%2C%20dpi%20%3D%20100%2C%20width%20%3D%208%2C%20height%20%3D%209.6)%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E%3Cbr%3EInteresting%20that%20Tijuana%20had%20about%20the%20same%20homicide%20rate%20in%202012%20as%20in%202006.%20The%20rest%20of%20the%20violent%20metro%20areas%2Fbig%20municipios%20which%20saw%20decreases%20are%20in%20Michoac%C3%A1n.%20Sadly%2C%20it%20doesn%E2%80%99t%20look%20like%20pattern%20will%20hold%20in%202013%20(according%20to%20%5Bcrimenmexico%5D(http%3A%2F%2Fcrimenmexico.diegovalle.net%2F)%20Michoac%C3%A1n%20is%20experiencing%20a%20surge%20of%20violence%3Cbr%3E%3Cbr%3EDo%20note%20that%20the%20charts%20were%20made%20using%20the%202010%20population%20according%20to%20the%20CONAPO%20that%20comes%20with%20mxmortalitydb%2C%20so%20homicides%20in%202012%20were%20overestimated%20by%20a%20little%20bit%20and%20underestimated%20by%20a%20little%20bit%20in%202006.%20Also%20rather%20%3Cbr%3E%3Cbr%3E%3Cbr%3E%3Cbr%3E%60%60%60r%3Cbr%3Ell%20%26lt%3B-%20list(%22Acapulco%22%2C%20%22Nuevo%20Laredo%22%2C%20%22La%20Laguna%22%2C%20%22Chihuahua%22%2C%20%22Tecom%C3%A1n%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22Ju%C3%A1rez%22%2C%20%22Culiac%C3%A1n%22%2C%20%22Victoria%22%2C%20%22Hidalgo%20del%20Parral%22%2C%20%22Zihuatanejo%20de%20Azueta%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22El%20Mante%22%2C%20%22Ciudad%20Valles%22%2C%20%22Ciudad%20Valles%22%2C%20%22Durango%22%2C%20%22Cuernavaca%22%2C%20%22Zacatecas-Guadalupe%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22Monterrey%22%2C%20%22Piedras%20Negras%22%2C%20%22Mazatl%C3%A1n%22%2C%20%22Veracruz%22%2C%20%22Tijuana%22%2C%20%22Guadalajara%22%2C%20%3Cbr%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22Tepic%22%2C%20%22Coatzacoalcos%22)%3Cbr%3Enames(ll)%20%26lt%3B-%20ll%26nbsp%3B%20%23%20make%20lapply%20print%20the%20names%20of%20the%20metro%20areas%3Cbr%3Elapply(ll%2C%20plotMetro%2C%20metro.areas.fake)%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%24Acapulco%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-51.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60Nuevo%20Laredo%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-52.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60La%20Laguna%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-53.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Chihuahua%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-54.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Tecom%C3%A1n%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-55.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Ju%C3%A1rez%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-56.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Culiac%C3%A1n%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-57.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Victoria%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-58.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60Hidalgo%20del%20Parral%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-59.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60Zihuatanejo%20de%20Azueta%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-510.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60El%20Mante%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-511.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60Ciudad%20Valles%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-512.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60Ciudad%20Valles%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-513.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Durango%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-514.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Cuernavaca%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-515.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60Zacatecas-Guadalupe%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-516.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Monterrey%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-517.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24%60Piedras%20Negras%60%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-518.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Mazatl%C3%A1n%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-519.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Veracruz%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-520.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Tijuana%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-521.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Guadalajara%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-522.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Tepic%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-523.png)%20%3Cbr%3E%3Cbr%3E%60%60%60%3Cbr%3E%23%23%20%3Cbr%3E%23%23%20%24Coatzacoalcos%3Cbr%3E%60%60%60%3Cbr%3E%3Cbr%3E!%5Bplot%20of%20chunk%20unnamed-chunk-5%5D(figure%2Funnamed-chunk-524.png)%20%3Cbr%3E%3Cbr%3E%3Cbr%3ECheck%20out%20the%20%5Bsource%20code%5D(https%3A%2F%2Fgist.github.com%2Fdiegovalle%2F7998868)%20as%20an%20R%20markdown%20file.%3Cbr%3E%3C%2Fp%3E" data-md-url="http://www.blogger.com/blogger.g?blogID=3280550716273637581#editor/target=post;postID=7831142791700560024" id="markdown-here-wrapper-626200">
<div style="margin: 1.2em 0px ! important;">
<a name="more"></a></div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code class="language-r" style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;"><span class="keyword" style="color: #333333; font-weight: bold;">library</span>(mxmortalitydb)
<span class="keyword" style="color: #333333; font-weight: bold;">library</span>(stringr)
<span class="keyword" style="color: #333333; font-weight: bold;">library</span>(plyr)
<span class="keyword" style="color: #333333; font-weight: bold;">library</span>(ggplot2)
<span class="keyword" style="color: #333333; font-weight: bold;">library</span>(grid) <span class="comment" style="color: #999988; font-style: italic;">## needed for arrow</span></code></pre>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code class="language-r" style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">plotMetro <- <span class="keyword" style="color: #333333; font-weight: bold;">function</span>(metro.name, metro.areas) {
<span class="comment" style="color: #999988; font-style: italic;">## Plot the homicide counts in a metro area or municipio metro.name - name of</span>
<span class="comment" style="color: #999988; font-style: italic;">## the metro area to plot metro.areas - data frame containing a list of metro</span>
<span class="comment" style="color: #999988; font-style: italic;">## areas in the same format as the metro.area dataframe from mxmortalitydb</span>
<span class="comment" style="color: #999988; font-style: italic;">## data.frame metro.areas contains the 2010 CONAPO metro areas</span>
df <- merge(injury.intent, metro.areas, by.x = c(<span class="string" style="color: #dd1144;">"state_reg"</span>, <span class="string" style="color: #dd1144;">"mun_reg"</span>),
by.y = c(<span class="string" style="color: #dd1144;">"state_code"</span>, <span class="string" style="color: #dd1144;">"mun_code"</span>))
<span class="comment" style="color: #999988; font-style: italic;">## Yearly homicides in Mexico City, by state of registration</span>
df2 <- ddply(subset(df, metro_area == metro.name & intent.imputed == <span class="string" style="color: #dd1144;">"Homicide"</span>),
.(year_reg), summarise, count = length(state_reg))
ggplot(df2, aes(year_reg, count)) + geom_line() + labs(title = str_c(<span class="string" style="color: #dd1144;">"Homicides (plus deaths of unknown intent classified as homicide) in\n"</span>,
metro.name)) + ylim(<span class="number" style="color: #009999;">0</span>, max(df2$count)) + ylab(<span class="string" style="color: #dd1144;">"homicide count"</span>) + xlab(<span class="string" style="color: #dd1144;">"year of registration"</span>) +
theme_bw()
}
plotChanges <- <span class="keyword" style="color: #333333; font-weight: bold;">function</span>(df, metro.areas, country.rate, years) {
<span class="comment" style="color: #999988; font-style: italic;">## Plot of rates and trends df - injury.intent dataframr metro.areas - data</span>
<span class="comment" style="color: #999988; font-style: italic;">## frame containing a list of metro areas in the same format as the</span>
<span class="comment" style="color: #999988; font-style: italic;">## metro.area dataframe from mxmortalitydb country.rate - rate to show as a</span>
<span class="comment" style="color: #999988; font-style: italic;">## gray dotted line years - start and end year to compare changes</span>
<span class="comment" style="color: #999988; font-style: italic;">## Where the municipio where the death occurred is unknown use the municipio</span>
<span class="comment" style="color: #999988; font-style: italic;">## where it was registered as place of occurrance</span> </code><code class="language-r" style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;"> df[df$mun_occur_death == <span class="number" style="color: #009999;">999</span>, ]$mun_occur_death <- df[df$mun_occur_death ==
<span class="number" style="color: #009999;">999</span>, ]$mun_reg
<span class="comment" style="color: #999988; font-style: italic;">## Counts of homicide by state and municipio</span>
df <- ddply(subset(df, year_reg %<span class="keyword" style="color: #333333; font-weight: bold;">in</span>% years & intent.imputed == <span class="string" style="color: #dd1144;">"Homicide"</span>),
.(state_occur_death, mun_occur_death, year_reg), summarise, count = length(state_reg))
<span class="comment" style="color: #999988; font-style: italic;">## Merge the counts with our fake metro areas</span>
df <- merge(df, metro.areas, by.x = c(<span class="string" style="color: #dd1144;">"state_occur_death"</span>, <span class="string" style="color: #dd1144;">"mun_occur_death"</span>),
by.y = c(<span class="string" style="color: #dd1144;">"state_code"</span>, <span class="string" style="color: #dd1144;">"mun_code"</span>))
<span class="comment" style="color: #999988; font-style: italic;">## Now get the counts by metro area (which may contain more than one</span>
<span class="comment" style="color: #999988; font-style: italic;">## municipio)</span>
df <- ddply(df, .(metro_area, year_reg), summarise, count = sum(count),
population = sum(mun_population_2010), rate = count/population * <span class="number" style="color: #009999;">10</span>^<span class="number" style="color: #009999;">5</span>)
<span class="comment" style="color: #999988; font-style: italic;">## We are only interesed if the metro area at some time had a homicide rate</span>
<span class="comment" style="color: #999988; font-style: italic;">## of at least 15</span>
df <- subset(df, metro_area %<span class="keyword" style="color: #333333; font-weight: bold;">in</span>% subset(df, rate > <span class="number" style="color: #009999;">15</span>)$metro_area)
<span class="comment" style="color: #999988; font-style: italic;">## Make sure the dataframe is ordered by metro and year</span>
df <- df[order(df$metro_area, df$year_reg), ]
<span class="comment" style="color: #999988; font-style: italic;">## Order the chart by homicide rate in 2012</span>
df$metro_area <- reorder(df$metro_area, df$rate, <span class="keyword" style="color: #333333; font-weight: bold;">function</span>(x) x[[<span class="number" style="color: #009999;">2</span>]])
<span class="comment" style="color: #999988; font-style: italic;">## Data frame for the arrow structure</span>
arrows <- ddply(df, .(metro_area), summarise, start = rate[<span class="number" style="color: #009999;">1</span>], end = rate[<span class="number" style="color: #009999;">2</span>],
metro_area = metro_area[<span class="number" style="color: #009999;">1</span>], change = ifelse(rate[<span class="number" style="color: #009999;">1</span>] >= rate[<span class="number" style="color: #009999;">2</span>], <span class="string" style="color: #dd1144;">"decrease"</span>,
<span class="string" style="color: #dd1144;">"increase"</span>))
ggplot(df, aes(rate, metro_area, group = as.factor(year_reg), color = as.factor(year_reg))) +
geom_point(aes(size = log(count))) + labs(title = <span class="string" style="color: #dd1144;">"Homicide (plus deaths of unknown intent classified as homicide) rates and trends"</span>) +
scale_size(<span class="string" style="color: #dd1144;">"number\nof\nhomicides"</span>, breaks = c(log(<span class="number" style="color: #009999;">50</span>), log(<span class="number" style="color: #009999;">500</span>), log(<span class="number" style="color: #009999;">3000</span>)),
labels = c(<span class="number" style="color: #009999;">50</span>, <span class="number" style="color: #009999;">500</span>, <span class="number" style="color: #009999;">3000</span>)) + geom_segment(data = arrows, aes(x = start,
y = metro_area, xend = end, yend = metro_area, group = change, color = change),
arrow = arrow(length = unit(<span class="number" style="color: #009999;">0.3</span>, <span class="string" style="color: #dd1144;">"cm"</span>)), alpha = <span class="number" style="color: #009999;">0.8</span>) + scale_color_manual(<span class="string" style="color: #dd1144;">"year\nand\ntrend"</span>,
values = c(<span class="string" style="color: #dd1144;">"gray"</span>, <span class="string" style="color: #dd1144;">"black"</span>, <span class="string" style="color: #dd1144;">"blue"</span>, <span class="string" style="color: #dd1144;">"red"</span>)) + ylab(<span class="string" style="color: #dd1144;">"metro area or municipio"</span>) +
xlab(<span class="string" style="color: #dd1144;">"homicide rate"</span>) + <span class="comment" style="color: #999988; font-style: italic;"># scale_x_log10()+</span>
geom_vline(xintercept = country.rate, linetype = <span class="number" style="color: #009999;">2</span>, color = <span class="string" style="color: #dd1144;">"#666666"</span>) +
annotate(<span class="string" style="color: #dd1144;">"text"</span>, y = <span class="string" style="color: #dd1144;">"Tapachula"</span>, x = <span class="number" style="color: #009999;">25</span>, label = <span class="string" style="color: #dd1144;">"country\naverage\n2012"</span>,
hjust = -<span class="number" style="color: #009999;">0.1</span>, size = <span class="number" style="color: #009999;">4</span>, color = <span class="string" style="color: #dd1144;">"#666666"</span>) + theme_bw()
}</code></pre>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code class="language-r" style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;"><span class="comment" style="color: #999988; font-style: italic;">## Let's treat the big municipalities which are not part of a metro area as</span>
<span class="comment" style="color: #999988; font-style: italic;">## if they were one rename big.municipios to merge with metro.areas</span>
big.municipios2 <- big.municipios
names(big.municipios2) <- c(<span class="string" style="color: #dd1144;">"state_code"</span>, <span class="string" style="color: #dd1144;">"mun_code"</span>, <span class="string" style="color: #dd1144;">"mun_population_2010"</span>,
<span class="string" style="color: #dd1144;">"metro_area"</span>)
metro.areas.fake <- rbind.fill(metro.areas, big.municipios2)</code></pre>
<div style="margin: 1.2em 0px ! important;">
Changes from 2011 to 2012 and from the year before the drug war was declared to 2012:</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code class="language-r" style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">plotChanges(injury.intent, metro.areas.fake, <span class="number" style="color: #009999;">24.5</span>, c(<span class="number" style="color: #009999;">2011</span>, <span class="number" style="color: #009999;">2012</span>))</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-Ss28AOrxjlM_UrEPajK4ieI_AAAAAAAAGfo_Y7-ccrj1tFk_s1600_change2011-2012.png" imageanchor="1" ><img border="0" height="640" src="/images/blogger_images/1.bp.blogspot.com_-Ss28AOrxjlM_UrEPajK4ieI_AAAAAAAAGfo_Y7-ccrj1tFk_s640_change2011-2012.png" width="532"/></a></div>
</div>
<code class="language-r" style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">plotChanges(injury.intent, metro.areas.fake, <span class="number" style="color: #009999;">24.5</span>, c(<span class="number" style="color: #009999;">2006</span>, <span class="number" style="color: #009999;">2012</span>))</code> <br/>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-Mz9Tm4MI25w_UrEPn32KnZI_AAAAAAAAGfs_JO39hf5Yt94_s1600_change2006-2012.png" imageanchor="1" ><img border="0" height="640" src="/images/blogger_images/3.bp.blogspot.com_-Mz9Tm4MI25w_UrEPn32KnZI_AAAAAAAAGfs_JO39hf5Yt94_s640_change2006-2012.png" width="532"/></a></div>
</div>
Interesting that Tijuana had about the same homicide rate in 2012 as in 2006. The rest of the violent metro areas/large municipios which saw decreases are in Michoacán. Sadly, it doesn’t look like pattern will hold in 2013 (according to <a href="https://elcri.men/">crimenmexico</a> Michoacán is experiencing a surge of violence and is at a maximum)<br/>
<div style="margin: 1.2em 0px ! important;">
Do note that the charts were made using the 2010 population according to the <span class="caps">CONAPO</span> that comes with mxmortalitydb, so homicides in 2012 were overestimated by a little bit and underestimated by a little bit in 2006. Also rather than using the raw homicide numbers I adjusted them by classifying deaths of unknown intent.</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code class="language-r" style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">ll <- list(<span class="string" style="color: #dd1144;">"Acapulco"</span>, <span class="string" style="color: #dd1144;">"Nuevo Laredo"</span>, <span class="string" style="color: #dd1144;">"La Laguna"</span>, <span class="string" style="color: #dd1144;">"Chihuahua"</span>, <span class="string" style="color: #dd1144;">"Tecomán"</span>,
<span class="string" style="color: #dd1144;">"Juárez"</span>, <span class="string" style="color: #dd1144;">"Culiacán"</span>, <span class="string" style="color: #dd1144;">"Victoria"</span>, <span class="string" style="color: #dd1144;">"Hidalgo del Parral"</span>, <span class="string" style="color: #dd1144;">"Zihuatanejo de Azueta"</span>,
<span class="string" style="color: #dd1144;">"El Mante"</span>, <span class="string" style="color: #dd1144;">"Ciudad Valles"</span>, <span class="string" style="color: #dd1144;">"Ciudad Valles"</span>, <span class="string" style="color: #dd1144;">"Durango"</span>, <span class="string" style="color: #dd1144;">"Cuernavaca"</span>, <span class="string" style="color: #dd1144;">"Zacatecas-Guadalupe"</span>,
<span class="string" style="color: #dd1144;">"Monterrey"</span>, <span class="string" style="color: #dd1144;">"Piedras Negras"</span>, <span class="string" style="color: #dd1144;">"Mazatlán"</span>, <span class="string" style="color: #dd1144;">"Veracruz"</span>, <span class="string" style="color: #dd1144;">"Tijuana"</span>, <span class="string" style="color: #dd1144;">"Guadalajara"</span>,
<span class="string" style="color: #dd1144;">"Tepic"</span>, <span class="string" style="color: #dd1144;">"Coatzacoalcos"</span>)
names(ll) <- ll <span class="comment" style="color: #999988; font-style: italic;"># make lapply print the names of the metro areas</span>
lapply(ll, plotMetro, metro.areas.fake)</code></pre>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">## $Acapulco</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-ORDmlTmq2DA_UrEP6ZzOGtI_AAAAAAAAGf0_Ti1vlfehsHc_s1600_unnamed-chunk-51.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/4.bp.blogspot.com_-ORDmlTmq2DA_UrEP6ZzOGtI_AAAAAAAAGf0_Ti1vlfehsHc_s320_unnamed-chunk-51.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $`Nuevo Laredo`</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-FmTVpSWBlhU_UrEQIoEoSMI_AAAAAAAAGf8_FmzSwJhbwB8_s1600_unnamed-chunk-52.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/1.bp.blogspot.com_-FmTVpSWBlhU_UrEQIoEoSMI_AAAAAAAAGf8_FmzSwJhbwB8_s320_unnamed-chunk-52.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $`La Laguna`</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-iQkmyWyY_YM_UrEQN4irbMI_AAAAAAAAGgE_TiE9VySgQs8_s1600_unnamed-chunk-53.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/3.bp.blogspot.com_-iQkmyWyY_YM_UrEQN4irbMI_AAAAAAAAGgE_TiE9VySgQs8_s320_unnamed-chunk-53.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><div class="separator" style="clear: both; text-align: center;">
</div>
<code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Chihuahua</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-cEQxPQmT0j8_UrEQZexn8XI_AAAAAAAAGgU_JxTNa-HXx5E_s1600_unnamed-chunk-54.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/1.bp.blogspot.com_-cEQxPQmT0j8_UrEQZexn8XI_AAAAAAAAGgU_JxTNa-HXx5E_s320_unnamed-chunk-54.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Tecomán</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-i1JLpESwryM_UrEQft3L8wI_AAAAAAAAGgc_EtOlw09cITk_s1600_unnamed-chunk-55.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/3.bp.blogspot.com_-i1JLpESwryM_UrEQft3L8wI_AAAAAAAAGgc_EtOlw09cITk_s320_unnamed-chunk-55.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Juárez</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-HnhZbgMrNEQ_UrEQmwVfq0I_AAAAAAAAGgk_K5ZUk1x5YTg_s1600_unnamed-chunk-56.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/4.bp.blogspot.com_-HnhZbgMrNEQ_UrEQmwVfq0I_AAAAAAAAGgk_K5ZUk1x5YTg_s320_unnamed-chunk-56.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Culiacán</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-DS8jzxkJzZo_UrEQvYsMw_I_AAAAAAAAGgs_5HVJnjR2jSY_s1600_unnamed-chunk-57.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/2.bp.blogspot.com_-DS8jzxkJzZo_UrEQvYsMw_I_AAAAAAAAGgs_5HVJnjR2jSY_s320_unnamed-chunk-57.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Victoria</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-0K1l1w8bcqg_UrEQ0Ryt1NI_AAAAAAAAGg0_wgVzYuZmpJE_s1600_unnamed-chunk-58.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/3.bp.blogspot.com_-0K1l1w8bcqg_UrEQ0Ryt1NI_AAAAAAAAGg0_wgVzYuZmpJE_s320_unnamed-chunk-58.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $`Hidalgo del Parral`</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-pAQpdWykc5M_UrEQ6nWprWI_AAAAAAAAGg8_d6U9aQrRqec_s1600_unnamed-chunk-59.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/1.bp.blogspot.com_-pAQpdWykc5M_UrEQ6nWprWI_AAAAAAAAGg8_d6U9aQrRqec_s320_unnamed-chunk-59.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $`Zihuatanejo de Azueta`</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-ZpMr2Blfn28_UrERBIOUK1I_AAAAAAAAGhE__bi4Cl056VU_s1600_unnamed-chunk-510.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/1.bp.blogspot.com_-ZpMr2Blfn28_UrERBIOUK1I_AAAAAAAAGhE__bi4Cl056VU_s320_unnamed-chunk-510.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $`El Mante`</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-2KdXpex_xPs_UrERHAuSMaI_AAAAAAAAGhM_YvpV6HxNH-o_s1600_unnamed-chunk-511.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/1.bp.blogspot.com_-2KdXpex_xPs_UrERHAuSMaI_AAAAAAAAGhM_YvpV6HxNH-o_s320_unnamed-chunk-511.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $`Ciudad Valles`</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-y7MR64HVGhw_UrERNawfTTI_AAAAAAAAGhU_Uk_2hpQRng4_s1600_unnamed-chunk-513.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/1.bp.blogspot.com_-y7MR64HVGhw_UrERNawfTTI_AAAAAAAAGhU_Uk_2hpQRng4_s320_unnamed-chunk-513.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Durango</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-rUaryQDdEUE_UrERcEFv6NI_AAAAAAAAGhc_O6oBw2TGG9I_s1600_unnamed-chunk-514.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/1.bp.blogspot.com_-rUaryQDdEUE_UrERcEFv6NI_AAAAAAAAGhc_O6oBw2TGG9I_s320_unnamed-chunk-514.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Cuernavaca</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-JPQ3Si0UIQ8_UrERiAJpFwI_AAAAAAAAGhk_1TpSCjwjMrQ_s1600_unnamed-chunk-515.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/4.bp.blogspot.com_-JPQ3Si0UIQ8_UrERiAJpFwI_AAAAAAAAGhk_1TpSCjwjMrQ_s320_unnamed-chunk-515.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><div class="separator" style="clear: both; text-align: center;">
</div>
<code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $`Zacatecas-Guadalupe`</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-x0U6mDkaeOk_UrERndD-rKI_AAAAAAAAGhs_WHJ184IjsUc_s1600_unnamed-chunk-516.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/4.bp.blogspot.com_-x0U6mDkaeOk_UrERndD-rKI_AAAAAAAAGhs_WHJ184IjsUc_s320_unnamed-chunk-516.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Monterrey</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-1qycVSFcW_M_UrERspBTJDI_AAAAAAAAGh0_wOV_TLpQv_A_s1600_unnamed-chunk-517.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/3.bp.blogspot.com_-1qycVSFcW_M_UrERspBTJDI_AAAAAAAAGh0_wOV_TLpQv_A_s320_unnamed-chunk-517.png" width="320"/></a></div>
<br/></div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $`Piedras Negras`</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-yJ7xv35EWJE_UrER4Y_S0TI_AAAAAAAAGiE_3cJl-g9rWEY_s1600_unnamed-chunk-518.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/4.bp.blogspot.com_-yJ7xv35EWJE_UrER4Y_S0TI_AAAAAAAAGiE_3cJl-g9rWEY_s320_unnamed-chunk-518.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Mazatlán</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-oWaQOvtrN6o_UrER-G4qUtI_AAAAAAAAGiM_HMuwjBsREbQ_s1600_unnamed-chunk-519.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/4.bp.blogspot.com_-oWaQOvtrN6o_UrER-G4qUtI_AAAAAAAAGiM_HMuwjBsREbQ_s320_unnamed-chunk-519.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Veracruz</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-dJrHpDSmWsI_UrESHa_v7oI_AAAAAAAAGiU_2rCUKULsBpA_s1600_unnamed-chunk-520.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/4.bp.blogspot.com_-dJrHpDSmWsI_UrESHa_v7oI_AAAAAAAAGiU_2rCUKULsBpA_s320_unnamed-chunk-520.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Tijuana</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-CrnEmATGcww_UrESM2wibxI_AAAAAAAAGic_SfbfxrxwWjE_s1600_unnamed-chunk-521.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/2.bp.blogspot.com_-CrnEmATGcww_UrESM2wibxI_AAAAAAAAGic_SfbfxrxwWjE_s320_unnamed-chunk-521.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Guadalajara</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-IK_HNkEVrRA_UrESSaQL5nI_AAAAAAAAGik_noY_GC3-aVE_s1600_unnamed-chunk-522.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/2.bp.blogspot.com_-IK_HNkEVrRA_UrESSaQL5nI_AAAAAAAAGik_noY_GC3-aVE_s320_unnamed-chunk-522.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Tepic</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-EARaW-4KLCw_UrESXur4VZI_AAAAAAAAGis_2LLNVcnIf5s_s1600_unnamed-chunk-523.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/1.bp.blogspot.com_-EARaW-4KLCw_UrESXur4VZI_AAAAAAAAGis_2LLNVcnIf5s_s320_unnamed-chunk-523.png" width="320"/></a></div>
</div>
<pre style="font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; font-size: 1em; line-height: 1.2em; margin: 1.2em 0px;"><code style="background-color: #f8f8f8; background: none repeat scroll 0% 0% rgb(248, 248, 255); border-radius: 3px; border-radius: 3px; border: 1px solid rgb(204, 204, 204); border: 1px solid rgb(234, 234, 234); color: #333333; display: block ! important; display: block; display: inline; font-family: Consolas,Inconsolata,Courier,monospace; font-size: 0.85em; margin: 0px 0.15em; overflow: auto; padding: 0.5em 0.7em; padding: 0.5em; padding: 0px 0.3em; white-space: pre-wrap; white-space: pre;">##
## $Coatzacoalcos</code></pre>
<div style="margin: 1.2em 0px ! important;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="http://www.blogger.com/blogger.g?blogID=3280550716273637581" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="/images/blogger_images/3.bp.blogspot.com_-u1hoCv0_6mY_UrESdDuUjuI_AAAAAAAAGi0_FWmreSa2Es0_s1600_unnamed-chunk-524.png" imageanchor="1" ><img border="0" height="274" src="/images/blogger_images/3.bp.blogspot.com_-u1hoCv0_6mY_UrESdDuUjuI_AAAAAAAAGi0_FWmreSa2Es0_s320_unnamed-chunk-524.png" width="320"/></a></div>
</div>
<div style="margin: 1.2em 0px ! important;">
Check out the <a href="https://gist.github.com/diegovalle/7998868">source code</a> as an R markdown file.</div>
</div>
<div style="clear: both;"></div>
</div>An R package with all injury intent deaths registered in Mexico 2004-20122013-12-17T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2013-12-17:2013/12/r-package-mexican-homicides.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
</div>
This is a data only <a href="https://github.com/diegovalle/mxmortalitydb">package</a> containing all injury intent deaths (accidents, suicides, homicides, legal interventions, and deaths of unspecified intent) registered by the <span class="caps">SSA</span>/<span class="caps">INEGI</span> from 2004 to 2012. The data source for the database is the <a href="http://www.inegi.org.mx/est/contenidos/proyectos/registros/vitales/mortalidad/default.aspx"><span class="caps">INEGI</span></a>. In addition the data was coded with the Injury Mortality Matrix provided by the <a href="http://www.cdc.gov/nchs/data/ice/icd10_transcode.pdf"><span class="caps">CDC</span></a>.<br/>
<br/>
The package is only available from github, to install:<br/>
<br/>
<span style='font-family: "Courier New",Courier,monospace;'>devtools::install_github(“diegovalle/mxmortalitydb”)</span><br/>
<br/>
be sure to visit its <a href="https://github.com/diegovalle/mxmortalitydb">github</a> page to find out more!
<div style="clear: both;"></div>
</div>Continuously updated crime information2013-09-30T00:00:00+02:00Diego Valle-Jonestag:blog.diegovalle.net,2013-09-30:2013/09/continuously-updated-crime-information.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-6ItLjBMaZ_k_Uki7ibzHHNI_AAAAAAAAGdw_4RkkPSvKglg_s1600_download.png" imageanchor="1" ><img border="0" height="265" src="/images/blogger_images/4.bp.blogspot.com_-6ItLjBMaZ_k_Uki7ibzHHNI_AAAAAAAAGdw_4RkkPSvKglg_s400_download.png" width="400"/></a></div>
I’ve put together a simple website to keep people up to date on the latest crime information. The site polls the <a href="http://www.secretariadoejecutivo.gob.mx/"><span class="caps">SESNSP</span> website</a> many times a day to see if there is new crime information, and if there is, it cleans up the data and makes it available for download.<br/>
<br/>
<a href="https://elcri.men/en/data.html">https://elcri.men/en/csv/</a> (Engish)<br/>
<a href="https://elcri.men/es/data.html">https://elcri.men/es/csv/</a> (Spanish)<br/>
<br/>
There’s also a <a href="https://elcri.men/">simple report</a> based on the data. In the future I hope to also include homicide data from the <span class="caps">INEGI</span>,<strike> and municipio population from the <span class="caps">CONAPO</span></strike> (the data now includes municipio population and information for all state level and federal crimes), so the data is bound to change at some point. If you’d like to see another crime or municipio added to the data or report feel free to contact me.<br/>
<br/>
For major updates or announcements <a href="https://twitter.com/diegovalle">follow me on twitter</a><br/>
<br/>
<span class="caps">P.S.</span> Keep in mind that the numbers refer to police reports and not number of victims.
<div style="clear: both;"></div>
</div>Interactive map of the drug war in Mexico2013-01-22T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2013-01-22:2013/01/interactive-map-of-drug-war-in-mexico-2013.html<div class='post-body entry-content' itemprop='articleBody'>
<div class="separator" style="clear: both; text-align: center;"><a href="http://www.diegovalle.net/narcomap" imageanchor="1" ><img border="0" height="400" src="/images/blogger_images/4.bp.blogspot.com_-ii8mL9QyZCI_UP8tcXh01XI_AAAAAAAAGHk_mUPesFYSCs4_s400_profile.png" width="400" /></a></div>I’ve updated the <a href="http://www.diegovalle.net/narcomap">interactive map</a> I made <a href="http://blog.diegovalle.net/2012/01/interactive-map-of-drug-war-in-mexico.html">last year</a> to include the 2011 homicide data the <span class="caps">INEGI</span> recently released. Because of bad publicity the government will no longer update the drug war-related homicide database, so that dataset will forever remain stuck in September 2011.<br />
<br />
<a name='more'></a><b>The cool thing about the new version of map is that you can statistically correct some of the errors in the way homicides are recorded in Mexico.</b><br />
<br />
Violent deaths can be classified as suicides, accidents, homicides, legal interventions and those of unspecified intent. There has been an upsurge in deaths of unspecified intent by firearm in Mexico at the same time all homicides increased, so it’s natural to assume that some of those unspecified deaths were really homicides.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="/images/blogger_images/4.bp.blogspot.com_-7RaCeePjgOU_UP8xN-JO01I_AAAAAAAAGIM_1NNbfjyKmX0_s1600_noesp.png" imageanchor="1" ><img border="0" height="285" src="/images/blogger_images/4.bp.blogspot.com_-7RaCeePjgOU_UP8xN-JO01I_AAAAAAAAGIM_1NNbfjyKmX0_s400_noesp.png" width="400" /></a></div>To correct the mistakes here is what I did:<br />
<ul><li>Classify all deaths of unknown intent into accidents, suicides and homicides based on the age, sex of the victim and injury mechanism by which the death occurred. The method I used is similar to the one I used in my <a href="http://blog.diegovalle.net/2012/07/machine-learning-for-better-homicide.html">Juarez post</a>. For example, if someone told you to guess the intent of the death of a 70 year old woman that died in Merida (one of Mexico’s safest cities) by motor vehicle, you’d probably guess it was an accident. If you had to guess the intent of the death of a young male in Ciudad Juárez that died by firearm, you’d probably think it was an homicide.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-a3NwCKlcOOQ_UP82PEN-K1I_AAAAAAAAGJI_Iv5rPcsztsw_s1600_extra.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="250" src="/images/blogger_images/1.bp.blogspot.com_-a3NwCKlcOOQ_UP82PEN-K1I_AAAAAAAAGJI_Iv5rPcsztsw_s400_extra.png" width="400" /></a></div></li>
<li>Recode all deaths by legal intervention as homicides (the <a href="http://mexico.cnn.com/nacional/2010/09/16/al-menos-19-personas-mueren-en-enfrentamientos-en-nl-y-tamaulipas">19 deaths from the shootout</a> between the army and the narcos in <a href="http://www.diegovalle.net/mapa-guerra-narco.html#city=Polygon&start=2010-01-15&end=2010-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=9&homtype=INEGI&clat=26.050476281176586&clong=-98.817626953125&statadj=false&names=true&polygon=-99.5965576171875+26.256472923285344%2C-99.4427490234375+26.148041726002866%2C-99.06097412109375+26.44844313751643%2C-99.13787841796875+26.539394329017032%2C-99.5965576171875+26.256472923285344">General Treviño and Mier were recorded as homicides</a>) since it seems legal intervention deaths are not always classified correctly.</li>
<li>Reconcile the problems in the <a href="http://blog.diegovalle.net/2012/09/more-errors-in-mexican-mortality.html">Federal District</a> and <a href="http://blog.diegovalle.net/2012/12/how-mexican-state-ended-up-with-more.html">Sinaloa</a></li>
<li>Since firearm accidents went from 6 in 2006 to a 100 in 2007 and again to 6 in 2008 I reclassified all firearm accidents in Baja California in 2007.</li>
<li>I added the mass grave in Taxco and the one in San Fernando since they don’t appear or are incomplete in the dataset from the <span class="caps">INEGI</span>.</li>
</ul><br />
Here are the results from in terms of sensitivity and specificity from the classification:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-6iqvsTQj6og_UP8xWdbW4UI_AAAAAAAAGIU_-ZQFmwokzpg_s1600_surface570.png" imageanchor="1" ><img border="0" height="346" src="/images/blogger_images/1.bp.blogspot.com_-6iqvsTQj6og_UP8xWdbW4UI_AAAAAAAAGIU_-ZQFmwokzpg_s400_surface570.png" width="400" /></a></div><br />
Even with the corrections I made there are still some errors left in the database, hopefully in the future I’ll figure out how to fix them.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="/images/blogger_images/3.bp.blogspot.com_-JRCnvFBYTqE_UP8xc6goRUI_AAAAAAAAGIc_9ZEHcFBWqGo_s1600_accnoesp.png" imageanchor="1" ><img border="0" height="285" src="/images/blogger_images/3.bp.blogspot.com_-JRCnvFBYTqE_UP8xc6goRUI_AAAAAAAAGIc_9ZEHcFBWqGo_s400_accnoesp.png" width="400" /></a></div><br />
Visit the map on facebook: <a href="https://www.facebook.com/narcomap">https://www.facebook.com/narcomap</a><br />
<br />
<span class="caps">P.S.</span> You can download the <a href="https://github.com/diegovalle/drug-war-interactive-map">source from GitHub</a><br />
<span class="caps">P.P.</span>S You can also download the <a href="https://github.com/diegovalle/death.index">program to clean the mortality database</a><br />
<span class="caps">P.P.P.</span>S If all you need is the data you can download it from the <a href="http://www.diegovalle.net/projects.html#url=%23datasets">datasets section of my website</a>
<div style='clear: both;'></div>
</div>Map of homicides in Monterrey2013-01-15T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2013-01-15:2013/01/map-of-homicides-in-monterrey.html<div class="post-body entry-content" itemprop="articleBody">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.diegovalle.net/monterrey" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="400" src="/images/blogger_images/4.bp.blogspot.com_-uCvC0Vgj4o4_UPMoA_1Ls0I_AAAAAAAAF_U_2z-WXGDnxNM_s400_Screenshot+-+01132013+-+03-28-52+PM.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Click on the image to visit the map</td></tr>
</tbody></table>
<br/>
This a somewhat cleaned up <a href="http://www.diegovalle.net/monterrey">2d density map of homicides</a> in Monterrey as reported by <a href="http://gruporeforma.elnorte.com/libre/offlines/mty/mapas/mapadelcrimen2012.htm">El Norte</a> during all of 2012. Do take note that the map is of homicide locations rather than counts and that I removed a couple of non-homicide events that were present in the original data.<br/>
<a name="more"></a><br/>
Monterrey is surrounded by mountains and if you notice in the map the area around Topo Chico “bleeds” into the mountain, so it would probably be a good idea to use a more complicated model, taking into account the natural boundaries of Monterrey, to estimate the density of homicides.<br/>
<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-lcKZ4GQJqqw_UPMtx13NIqI_AAAAAAAAF_8_rJvsdUl5ZdE_s1600_Screenshot+-+01102013+-+07-01-37+PM.png" imageanchor="1" ><img border="0" height="219" src="/images/blogger_images/3.bp.blogspot.com_-lcKZ4GQJqqw_UPMtx13NIqI_AAAAAAAAF_8_rJvsdUl5ZdE_s320_Screenshot+-+01102013+-+07-01-37+PM.png" width="320"/></a></div>
<br/>
<br/>
In this <a href="http://aitbus.org/aitbus/images/stories/pdf/dr%20arturo%20cervantes%20trejo%20conapra%20mxico.pdf">presentation</a> by Arturo Cervantes you can see that the areas with the most homicides kind of match the locations of <a href="/images/blogger_images/3.bp.blogspot.com_-lcKZ4GQJqqw_UPMtx13NIqI_AAAAAAAAF_8_rJvsdUl5ZdE_s1600_Screenshot+-+01102013+-+07-01-37+PM.png">motor vehicle accidents</a>. The central part of Monterrey is actually <a href="http://www.scielo.cl/fbpe/img/invi/v25n69/art01Fig05.jpg">less population dense</a> than other areas, but apparently everybody travels there for work or play. And since everybody is there, that’s where most homicides happen.<br/>
<br/>
Data Source: <a href="http://gruporeforma.elnorte.com/libre/offlines/mty/mapas/mapadelcrimen2012.htm" target="_blank">Mapa del Crimen 2012</a> from <a href="http://www.elnorte.com/" target="_blank">El Norte</a>
<div style="clear: both;"></div>
</div>The most dangerous days of the year2012-12-18T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2012-12-18:2012/12/the-most-dangerous-days-of-year.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-lFjHQ0_uqBY_UNcs3bQgFNI_AAAAAAAAF9Q_4-3ciPgNcRA_s1600_text5544-4.png" imageanchor="1" ><img border="0" height="192" src="/images/blogger_images/2.bp.blogspot.com_-lFjHQ0_uqBY_UNcs3bQgFNI_AAAAAAAAF9Q_4-3ciPgNcRA_s400_text5544-4.png" width="400"/></a></div>
When looking at days of the year with the most homicides a pattern jumps out: violence is significantly higher during certain holidays in Mexico compared to the rest of the year. This is a well studied pattern in <a href="http://uwf.edu/hlsd/pr%20homicide%20suicide%20major%20holidays.pdf">other countries</a>.<br/>
<a name="more"></a><br/>
Most violent dates 1998-2007:<br/>
<table border="1"><tbody>
<tr> <th>Date </th> <th>Homicides </th> </tr>
<tr> <td>2000-Jan-01 </td> <td align="right">93 </td> </tr>
<tr> <td>1998-Dec-25 </td> <td align="right">92 </td> </tr>
<tr> <td>2001-Jan-01 </td> <td align="right">89 </td> </tr>
<tr> <td>1999-Jan-01 </td> <td align="right">88 </td> </tr>
<tr> <td>2005-Jan-01 </td> <td align="right">80 </td> </tr>
<tr> <td>1999-Dec-25 </td> <td align="right">78 </td> </tr>
<tr> <td>1998-Mar-01 </td> <td align="right">76 </td> </tr>
<tr> <td>1998-Jun-14 </td> <td align="right">74 </td> </tr>
<tr> <td>1998-Oct-25 </td> <td align="right">73 </td> </tr>
<tr> <td>1998-Nov-29 </td> <td align="right">73 </td> </tr>
</tbody></table>
<br/>
Six of the ten most violent days from 1998 to 2007 where either the first day of the year or Christmas. To check whether holidays were really more violent than the rest of the year I plotted the total number of homicides for the period 1998-2003, and 2005 (so each day after February would fall exactly once each day of the week). I excluded the drug war years to make the pattern more obvious.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-9nrBlgBi7po_UNEquxG57AI_AAAAAAAAF8o_SE7NizcpOqY_s1600_surface726.png" imageanchor="1" ><img border="0" height="192" src="/images/blogger_images/3.bp.blogspot.com_-9nrBlgBi7po_UNEquxG57AI_AAAAAAAAF8o_SE7NizcpOqY_s400_surface726.png" width="400"/></a></div>
<span style="font-size: x-small;"><span style="font-size: small;">Sum of <span style="font-size: small;">daily homicides</span></span></span><span style="font-size: small;"> from 1998-2003, and 2005 (ten most vi<span style="font-size: small;">olent dates)</span>:</span><br/>
<table border="1"><tbody>
<tr> <th>Total<br/>
Homicides<br/>
(Sum of All Dates) </th> <th>Day<br/>
Number </th> <th>Holiday</th></tr>
<tr> <td align="right">558 </td> <td>Jan-01 </td> <td>New Year </td> </tr>
<tr> <td align="right">388 </td> <td>Dec-25 </td> <td>Christmas </td> </tr>
<tr> <td align="right">357 </td> <td>Sep-16 </td> <td>Independence Day </td> </tr>
<tr> <td align="right">281 </td> <td>Nov-02 </td> <td>Day of the Dead</td> </tr>
<tr> <td align="right">270 </td> <td>Feb-15 </td> <td>Day After Valentine’s Day </td> </tr>
<tr> <td align="right">270 </td> <td>Dec-12 </td> <td>Virgin of Guadalupe </td> </tr>
<tr> <td align="right">269 </td> <td>Dec-24 </td> <td>Christmas Eve </td> </tr>
<tr> <td align="right">263 </td> <td>May-10 </td> <td>Mother’s Day </td> </tr>
<tr> <td align="right">259 </td> <td>Dec-31 </td> <td>New Year’s Eve </td> </tr>
<tr> <td align="right">256 </td> <td>May-03 </td> <td>Related to Labor Day?</td> </tr>
</tbody></table>
<br/>
I find it quite interesting that the day of the dead would be one of the most violent days of the year. In countries where most homicides are solved, most homicide victims knew their attacker, so perhaps hanging out with family and friends during the holidays is not such a good idea? Does that stress people out?<br/>
<br/>
Performing an analysis of variance and testing for multiple comparisons with a Tukey test, the list of holidays above (coded as a binary variable), controlling for month of year and day of week, were expected to have between 28 and 39 extra homicides with a point estimate of 33 homicides.<br/>
<br/>
<div style="overflow: auto;">
<div class="geshifilter">
<pre class="r geshifilter-R" style="font-family: monospace;">fit <- <a href="http://inside-r.org/r-doc/stats/aov"><span style="color: #003399; font-weight: bold;">aov</span></a><span style="color: #009900;">(</span>total.deaths ~ <a href="http://inside-r.org/r-doc/base/as.factor"><span style="color: #003399; font-weight: bold;">as.factor</span></a><span style="color: #009900;">(</span>holiday<span style="color: #009900;">)</span> + <a href="http://inside-r.org/r-doc/base/as.factor"><span style="color: #003399; font-weight: bold;">as.factor</span></a><span style="color: #009900;">(</span>month<span style="color: #009900;">(</span><a href="http://inside-r.org/r-doc/base/date"><span style="color: #003399; font-weight: bold;">date</span></a><span style="color: #009900;">)</span><span style="color: #009900;">)</span> + <a href="http://inside-r.org/r-doc/base/as.factor"><span style="color: #003399; font-weight: bold;">as.factor</span></a><span style="color: #009900;">(</span>wday<span style="color: #009900;">)</span><span style="color: #339933;">,</span>
<a href="http://inside-r.org/r-doc/utils/data"><span style="color: #003399; font-weight: bold;">data</span></a> = homicides<span style="color: #009900;">)</span>
<a href="http://inside-r.org/r-doc/stats/TukeyHSD"><span style="color: #003399; font-weight: bold;">TukeyHSD</span></a><span style="color: #009900;">(</span>fit<span style="color: #009900;">)</span></pre>
</div>
</div>
<br/>
Results for all days from 1998 to 2007:<br/>
<pre>## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = total.deaths ~ as.factor(holiday) + as.factor(month(date)) + as.factor(wday), data = homicides)
##
## $`as.factor(holiday)`
## diff lwr upr p adj
## TRUE-FALSE 33.46 28.37 38.55 0
##
## $`as.factor(wday)`
## diff lwr upr p adj
## 2-1 -11.9148 -13.3360 -10.49355 0.0000
## 3-1 -16.9419 -18.3645 -15.51927 0.0000
## 4-1 -18.3969 -19.8188 -16.97494 0.0000
## 5-1 -17.6014 -19.0226 -16.18016 0.0000
## 6-1 -16.3855 -17.8068 -14.96427 0.0000
## 7-1 -11.1132 -12.5344 -9.69192 0.0000
## 3-2 -5.0271 -6.4490 -3.60516 0.0000
## 4-2 -6.4821 -7.9033 -5.06083 0.0000
## 5-2 -5.6866 -7.1072 -4.26605 0.0000
## 6-2 -4.4707 -5.8913 -3.05016 0.0000
## 7-2 0.8016 -0.6189 2.22219 0.6398
## 4-3 -1.4550 -2.8776 -0.03238 0.0411
## 5-3 -0.6595 -2.0815 0.76240 0.8188
## 6-3 0.5564 -0.8656 1.97829 0.9109
## 7-3 5.8287 4.4068 7.25064 0.0000
## 5-4 0.7955 -0.6258 2.21670 0.6489
## 6-4 2.0113 0.5901 3.43259 0.0006
## 7-4 7.2837 5.8625 8.70495 0.0000
## 6-5 1.2159 -0.2047 2.63645 0.1506
## 7-5 6.4882 5.0677 7.90880 0.0000
## 7-6 5.2724 3.8518 6.69292 0.0000
</pre>
Sunday is 1
<div style="clear: both;"></div>
</div>Mexico’s Drug War: 63,000 extra deaths in 6 years2012-12-11T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2012-12-11:2012/12/mexicos-drug-war-63000-extra-deaths-in.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-KERkdsddYDQ_UMfKcVv8bII_AAAAAAAAF7M_wT-3-Wv9atw_s1600_path5216-7.png" imageanchor="1" ><img border="0" height="221" src="/images/blogger_images/2.bp.blogspot.com_-KERkdsddYDQ_UMfKcVv8bII_AAAAAAAAF7M_wT-3-Wv9atw_s400_path5216-7.png" width="400"/></a></div>
Six years ago Felipe Calderón declared war on the drug cartels soon after taking office by sending troops to his home state of Michoacán. Six years later the war still rages on as Enrique Peña Nieto starts his term of office, and everyone is taking a look at the legacy of the man who started the war.<br/>
<a name="more"></a><br/>
There are newspapers and organizations that keep tallies of drug war-related deaths, which in itself is very laudable, but drug trafficking existed long before Calderón came to office and it will exist long after he leaves. Plus, there is also the issue that the government stopped publishing data on drug war-related deaths after September 2011, and its numbers usually came out higher than the private estimates. <br/>
<br/>
To judge the events of the sexenio I’ll focus first on counting the total number of homicides as accurately as possible for a blog post, then setting a baseline and counting the number of excess deaths. To start, there’s the official <a href="http://www.inegi.org.mx/est/contenidos/Proyectos/registros/vitales/mortalidad/"><span class="caps">INEGI</span> data</a> and <a href="http://www.secretariadoejecutivo.gob.mx/"><span class="caps">SNSP</span> data</a> which everyone can access online. I’ll order the <span class="caps">INEGI</span> homicides by date registered (instead of date of occurrence) and add firearm accidents since they: <br/>
<ol>
<li>Have been increasing </li>
<li>As we saw in <a href="http://blog.diegovalle.net/2012/12/how-mexican-state-ended-up-with-more.html">my last post</a> sometimes they resemble homicides more than accidents. </li>
</ol>
<br/>
<table border="0" cellspacing="0" cols="6"> <colgroup span="6" width="85"></colgroup> <tbody>
<tr> <td align="LEFT" height="47"><b><span style="font-family: Times New Roman;">Year </span></b></td> <td align="CENTER"><b><span style="font-family: Times New Roman;"><span class="caps">INEGI</span> Homicides</span></b></td> <td align="CENTER"><b><span style="font-family: Times New Roman;">Firearm Accidents</span></b></td> <td align="CENTER"><b><span style="font-family: Times New Roman;">Unknown Intent</span></b></td> <td align="CENTER"><b><span style="font-family: Times New Roman;">Imputed <span class="caps">INEGI</span> Homicides</span></b></td> <td align="CENTER"><b><span style="font-family: Times New Roman;"><span class="caps">SNSP</span> Homicide<br/>
Reports†</span></b></td> </tr>
<tr> <td align="LEFT" height="17"><b><span style="font-family: Times New Roman;">2004</span></b></td> <td align="CENTER">9,328</td> <td align="CENTER">366</td> <td align="CENTER">2,957</td> <td align="CENTER">10,339</td> <td align="CENTER">11,658‡</td> </tr>
<tr> <td align="LEFT" height="17"><b><span style="font-family: Times New Roman;">2005</span></b></td> <td align="CENTER">9,918</td> <td align="CENTER">271</td> <td align="CENTER">2,932</td> <td align="CENTER">10,942</td> <td align="CENTER">11,255‡</td> </tr>
<tr> <td align="LEFT" height="17"><b><span style="font-family: Times New Roman;">2006</span></b></td> <td align="CENTER">10,449</td> <td align="CENTER">265</td> <td align="CENTER">2,793</td> <td align="CENTER">11,414</td> <td align="CENTER">11,775‡</td> </tr>
<tr> <td align="LEFT" height="17"><b><span style="font-family: Times New Roman;">2007</span></b></td> <td align="CENTER">8,864</td> <td align="CENTER">699</td> <td align="CENTER">2,376</td> <td align="CENTER">10,205</td> <td align="CENTER">10,253</td> </tr>
<tr> <td align="LEFT" height="17"><b><span style="font-family: Times New Roman;">2008</span></b></td> <td align="CENTER">14,005</td> <td align="CENTER">555</td> <td align="CENTER">2,567</td> <td align="CENTER">15,246</td> <td align="CENTER">13,193</td> </tr>
<tr> <td align="LEFT" height="17"><b><span style="font-family: Times New Roman;">2009</span></b></td> <td align="CENTER">19,804</td> <td align="CENTER">456</td> <td align="CENTER">2,920</td> <td align="CENTER">21,065</td> <td align="CENTER">16,117</td> </tr>
<tr> <td align="LEFT" height="17"><b><span style="font-family: Times New Roman;">2010</span></b></td> <td align="CENTER">25,757</td> <td align="CENTER">630</td> <td align="CENTER">3,594</td> <td align="CENTER">27,508</td> <td align="CENTER">20,681</td> </tr>
<tr> <td align="LEFT" height="17"><b><span style="font-family: Times New Roman;">2011</span></b></td> <td align="CENTER">27,212</td> <td align="CENTER"><span style="font-family: Times New Roman;"><br/>
</span></td> <td align="CENTER">5,630</td> <td align="CENTER"><span style="font-family: Times New Roman;"><br/>
</span></td> <td align="CENTER">22,487</td> </tr>
</tbody></table>
<span style="font-size: x-small;">† A homicide report may refer to more than one victim<br/>
‡ The State of Mexico was registering accidental deaths as if they were homicides<br/>
<br/>
</span><br/>
Notice how deaths of unknown intent were on a downward trend up to 2008 when the trend reversed at the same time homicides surged. As I detailed in <a href="http://blog.diegovalle.net/2012/11/mexicos-most-violent-cities-in-2011.html">this post</a> and in my post about <a href="http://blog.diegovalle.net/2012/07/machine-learning-for-better-homicide.html">classifying deaths of unknown intent in Ciudad Juárez </a>they:<br/>
<ol>
<li>Statistically resemble homicides and </li>
<li>Explain some of the difference in under-reported homicide deaths when compared with drug war-related homicides.</li>
</ol>
<br/>
To classify deaths of unknown intent I first recoded <i>legal intervention / operations of war</i> deaths as homicides, I then excluded deaths that occurred outside of Mexico. Because of the <a href="http://blog.diegovalle.net/2012/09/more-errors-in-mexican-mortality.html">anomaly in the Federal District</a> I recoded all accidental deaths during January and February of 2007 in this federate entity as unknown. In Sinaloa I recoded <a href="http://blog.diegovalle.net/2012/12/how-mexican-state-ended-up-with-more.html">accidental deaths by firearm</a> as unknown as I detailed in my previous post. And in Baja California I set all firearm accidents as deaths of unknown intent in 2007.<br/>
<br/>
I still have lots of doubts about the vital statistics in Chiapas, but since it is not a state that has suffered the worst of the drug war I’ll leave it alone. Also the mass graves found in Guerrero seem to be missing from the data (add another 100?), but I’ll ignore it. And in Tamaulipas even including deaths of unknown intent under-counts drug war-related homicides, but again I’ll ignore it (add about another 200-400? homicides to my estimate). <br/>
<br/>
I used linear discriminant analysis and k-nearest neighbours classify each and every death of unknown intent in the database (plus some accidents for the states I previously mentioned) taking into account the injury mechanism, and the age and sex of the victim. To make sure I wasn’t overfitting the data I calculated the sensitivity ans specificity for each state or group of states (some states are pretty small):<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-3cXrGPt-vCU_UMaDQFfW7YI_AAAAAAAAF6U_mqf042i1M04_s1600_surface2971.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="346" src="/images/blogger_images/1.bp.blogspot.com_-3cXrGPt-vCU_UMaDQFfW7YI_AAAAAAAAF6U_mqf042i1M04_s400_surface2971.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The accuracy refers to the overall accuracy of the classification of homicides, accidents and suicides. The sensitivity and specificity refer only to homicides</td></tr>
</tbody></table>
<br/>
I could have used fancier algorithms to try and get better classification performance, but the results were pretty good and I wanted something fast. Also take into account that since I have to use the raw data from the mortality database I only have data available up to 2010.<br/>
<br/>
Here’s what the more accurate monthly homicide time series looks like:<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-VjDkaEqk_AI_UMfLCe_1KkI_AAAAAAAAF7U_-uRRFytVZtE_s1600_Rplot.png" imageanchor="1" ><img border="0" height="335" src="/images/blogger_images/4.bp.blogspot.com_-VjDkaEqk_AI_UMfLCe_1KkI_AAAAAAAAF7U_-uRRFytVZtE_s400_Rplot.png" width="400"/></a> </div>
I used an <span class="caps">ARIMA</span>(0,1,1)(1,1,0)[12] regression on the monthly <span class="caps">SNSP</span> police reports to predict the <span class="caps">INEGI</span> homicides + firearm accidents + the deaths of unknown intent imputed to be homicides from January 2012 to November 2012 since no vital statistics data is available after 2011.<br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/4.bp.blogspot.com_-wY9jFr8cKyA_UMftm3oaYoI_AAAAAAAAF78_Sits4AqLLxE_s1600_extra.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="/images/blogger_images/4.bp.blogspot.com_-wY9jFr8cKyA_UMftm3oaYoI_AAAAAAAAF78_Sits4AqLLxE_s400_extra.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Do note the increase in Tamaulipas</td></tr>
</tbody></table>
For the baseline estimate of the number of deaths I simply used the average monthly deaths from January 2004 to November 2006 (increasing at 1% per year), I then substracted or added the total number of imputed deaths from the baseline estimate (some homicides were surely prevented by the drug war in the beginning stages) to obtain the excess deaths. The total excess imputed homicides for the Calderón sexenio was of 63,000 (61,000-66,000 95% <span class="caps">CI</span>), I rounded the numbers to the nearest multiple of 1,000 since it doesn’t make any sense to report the number with much accuracy.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-KERkdsddYDQ_UMfKcVv8bII_AAAAAAAAF7M_wT-3-Wv9atw_s1600_path5216-7.png" imageanchor="1" ><img border="0" height="221" src="/images/blogger_images/2.bp.blogspot.com_-KERkdsddYDQ_UMfKcVv8bII_AAAAAAAAF7M_wT-3-Wv9atw_s400_path5216-7.png" width="400"/></a></div>
There are a number of problems with my estimate:<br/>
<ul>
<li>I used data on police reports from the <span class="caps">SNSP</span>, but if I used drug war homicide data from <a href="http://www.milenio.com/cdb/doc/noticias2011/7d97ccec10baf5f29e3d096cff54a3ea">Milenio</a> I would have goten much higher estimates since deaths during the first eleven months of each year <b>increased</b> from 11,343 in 2011 to 11,412 in 2012.</li>
<li>The more or less arbitrary baseline is open to criticism. According to the Secretary of Interior Alejandro Poiré they found a country <a href="http://www.elindependiente.mx/noticias/?idNota=9736">“infested by rats”</a>. Calderón supporters would put the baseline much much higher than the one I used, though I have the feeling this is just an ad-hoc justification since they never provided any evidence for this. Then there is also the fact that the government considers most of the dead to have been criminals, so we have the president (in)famously stating “<a href="http://www.hrw.org/news/2011/05/26/monster-and-monterrey">If you see dust in the air, it’s because we’re cleaning house,”</a> supporters of the war would argue that those who lost their lives in a certain way deserved their fate.</li>
<li>Saying that Mexico was on the verge of a drug war before the president took office is not the only view since each generation of Mexicans was <a href="http://blog.diegovalle.net/2012/10/age-period-cohort-models-and-decline-of.html">becoming less violent before the drug war</a> (though with important <a href="/images/blogger_images/3.bp.blogspot.com_-_Y4BX2ZUJGc_UHOaFNPdOfI_AAAAAAAAFpM_h8JRVj1WSDo_s1600_flowRoot3806.png">period effects</a>), and Mexico had had episodes of localized drug violence before in <a href="/images/blogger_images/4.bp.blogspot.com__q3Caf3YFFAs_TFwxvePIh8I_AAAAAAAAES4_8Oe4cwGvNzQ_s1600_cd.juarez-historic.png">mid-ninties in Ciudad Juárez</a> and at the turn of the century in Tijuana without plunging into a extended drug war, so maybe the baseline is set too high. </li>
</ul>
<br/>
I’m still missing mass graves that haven’t been found, and bodies that simply disappeared without leaving a trace. One could <a href="http://www.stat.duke.edu/~kcl12/Human%20Rights_files/academic-paper.pdf">combine the various lists of disappeared</a> kept by the <span class="caps">PGR</span> and <span class="caps">SSP</span> to produce an estimate of the number of missing persons in Mexico, but you would still have to match them somehow to the mortality datase since many o the dead are never fully identified. This means my estimate is a lower limit.<br/>
<br/>
<div style="clear: both;"></div>
</div>How a Mexican state ended up with more drug war homicides than total homicides2012-12-05T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2012-12-05:2012/12/how-mexican-state-ended-up-with-more.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-8cVSAdiqkq0_UL9pKdSXsvI_AAAAAAAAF5s_q35vQF7ibUY_s1600_diffplot.png" imageanchor="1" ><img border="0" height="207" src="/images/blogger_images/1.bp.blogspot.com_-8cVSAdiqkq0_UL9pKdSXsvI_AAAAAAAAF5s_q35vQF7ibUY_s400_diffplot.png" width="400"/></a></div>
During 2007 and 2008 the Mexican <a href="http://www.diegovalle.net/drug-war-map.html#city=Polygon&start=2010-01-15&end=2010-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=27.876578730659567&clong=-107.4583740234375&polygon=-109.51171875+25.893820362797484%2C-108.3306884765625+27.010196431931526%2C-107.1551513671875+25.591994180254712%2C-107.1002197265625+25.010950810695284%2C-106.3916015625+24.191858272317656%2C-106.182861328125+24.347096633808512%2C-105.6719970703125+23.34729931216778%2C-105.5126953125+23.115101554603044%2C-105.46875+22.61908160971607%2C-105.732421875+22.512556954051437%2C-107.984619140625+24.1367281697474%2C-109.6270751953125+25.710836919640595%2C-109.51171875+25.893820362797484">state of Sinaloa</a> had more drug war-related homicides than total homicides. This should in theory be impossible since drug war homicides are a subset of total homicides. How did this happen? <br/>
<br/>
<a name="more"></a>Here is a chart from <a href="http://blog.diegovalle.net/2011/02/strengths-and-weaknesses-of-crime-data.html">my old post highlighting the monthly difference between the vital statistics data and drug war-related homicides (Dec 2006- Dec 2009)</a>:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com__q3Caf3YFFAs_TVK65KW6OZI_AAAAAAAAEpc_p5Fji8Jnefs_s1600_drh-vs-inegi-recent.png" imageanchor="1" ><img border="0" height="280" src="/images/blogger_images/4.bp.blogspot.com__q3Caf3YFFAs_TVK65KW6OZI_AAAAAAAAEpc_p5Fji8Jnefs_s400_drh-vs-inegi-recent.png" width="400"/></a></div>
Just two weeks ago <a href="http://www.notinfomex.info/2012/11/localizan-ocho-cuerpos-ejecutado-y.html">8 bodies were found in Sinaloa</a>, I can only image how difficult it must be to determine the exact dates the homicides occurred in some cases. So it’s not a big deal if a month ends up having 5 or so extra drug war homicides than total homicides. But when drug homicides exceed total homicides for a year and a half as it did in Sinaloa, you know something is wrong.<br/>
<br/>
Most homicides in Sinaloa are caused by firearms, and given the <a href="http://blog.diegovalle.net/2010/12/some-problems-with-mexican-mortality.html">other</a> <a href="http://blog.diegovalle.net/2012/09/more-errors-in-mexican-mortality.html">errors</a> in the mortality database it seems one should look if the discrepancy in the numbers lie in an excess of firearm deaths.<br/>
<br/>
Here’s a table of the yearly vital statistics data on homicides, firearm accidents and drug war-related homicides:<br/>
<br/>
<table border="2" cellpadding="6" cellspacing="0" frame="hsides" rules="groups"><caption> </caption> <colgroup><col class="right"></col><col class="right"></col><col class="left"></col><col class="right"></col> </colgroup> <tbody>
<tr><td class="right"><b>Year</b></td><td class="right"><b>All Homicides</b></td><td class="left"><b>Drug-Related </b><br/>
<b>Homicides</b></td><td class="right"><b>Accidental </b><br/>
<b>Firearm Deaths</b></td></tr>
<tr><td class="right">2004</td><td class="right">387</td><td class="left"><span class="caps">NA</span></td><td class="right">61</td></tr>
<tr><td class="right">2005</td><td class="right">450</td><td class="left"><span class="caps">NA</span></td><td class="right">47</td></tr>
<tr><td class="right">2006</td><td class="right">451</td><td class="left"><span class="caps">NA</span></td><td class="right">26</td></tr>
<tr><td class="right"><span class="Apple-style-span" style="color: red;">2007</span></td><td class="right"><span class="Apple-style-span" style="color: red;">387</span></td><td class="left"><span class="Apple-style-span" style="color: red;">426</span></td><td class="right"><span class="Apple-style-span" style="color: red;">204</span></td></tr>
<tr><td class="right"><span class="Apple-style-span" style="color: red;">2008</span></td><td class="right"><span class="Apple-style-span" style="color: red;">869</span></td><td class="left"><span class="Apple-style-span" style="color: red;">1,084</span></td><td class="right"><span class="Apple-style-span" style="color: red;">198</span></td></tr>
<tr><td class="right">2009</td><td class="right">1,422</td><td class="left">1,059</td><td class="right">36</td></tr>
<tr><td class="right">2010</td><td class="right">2,277</td><td class="left">1,815</td><td class="right">67†</td></tr>
</tbody> </table>
<span style="font-size: x-small;">† Preliminary estimates undercounted by about 6%</span><br/>
<span style="color: #222222; font-family: arial,sans-serif; font-size: x-small;"><span style="line-height: 16px;"><br/>
</span></span> <br/>
I highlighted the years where drug homicides exceeded all homicides. As you can see the anomalous years also had an extremely high number of firearm accidents (I used the <a href="http://www.cdc.gov/nchs/injury/ice/matrix10.htm">External Cause of Injury Mortality Matrix</a> for <span class="caps">ICD</span>-10 to code accidents by firearm) <br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-aduxS_YGljQ_UL1L_FAcO2I_AAAAAAAAF4M_hD7jv0btDlY_s1600_drh_firearm-acc_hom.png" imageanchor="1" ><img border="0" height="207" src="/images/blogger_images/1.bp.blogspot.com_-aduxS_YGljQ_UL1L_FAcO2I_AAAAAAAAF4M_hD7jv0btDlY_s400_drh_firearm-acc_hom.png" width="400"/></a></div>
In fact, there’s a very high correlation when looking at the unexplained drug homicides (the drug homicides left over when we substract the drug war-related homicides from the total homicides) and firearm accidents, but only during the anomalous years:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-8cVSAdiqkq0_UL9pKdSXsvI_AAAAAAAAF5s_q35vQF7ibUY_s1600_diffplot.png" imageanchor="1" ><img border="0" height="207" src="/images/blogger_images/1.bp.blogspot.com_-8cVSAdiqkq0_UL9pKdSXsvI_AAAAAAAAF5s_q35vQF7ibUY_s400_diffplot.png" width="400"/></a></div>
I don’t think there can be any doubt that at least some of deaths by firearm accident correspond to those in the drug-war related homicide database during 2007 and 2008. Now the question is whether they are really homicides or accidents.<br/>
<div class="separator" style="clear: both; text-align: left;">
<br/></div>
<div class="separator" style="clear: both; text-align: left;">
It seems natural that firearm accidents would rise along with homicides as the drug war ratcheted up, since an escalation of violence would involve hiring newer, less experienced gunmen. As you’d expect the newer gunmen were not the brightest bulbs in the box. But even for dumb cartel gunmen I’m surprised by the sudden increase in accidents and the sudden drop after 2008. </div>
<div class="separator" style="clear: both; text-align: left;">
<br/></div>
<div class="separator" style="clear: both; text-align: left;">
There’s also the fact that the police and government authorities are under much more pressure to bring down the number of homicides than the number of accidents. For all these reasons I think it is much more likely that at least some homicides were misclassified as accidents, and that this explains part of the discrepancy during 2007 and 2008.</div>
<br/>
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="315" src="https://www.youtube.com/embed/Gw5fGGSfSFg" width="420"></iframe><br/>
<span style="font-size: x-small;">As funny as I find this, it probably didn’t happen in Sinaloa in 2007 and 2008</span><br/>
<br/>
What I’ll do to find out whether the deaths were accidents or homicides is to first ignore the classification specified in the mortality database for all firearm accidents from January 2007 to December 2008. Then use machine learning to see if the characteristics of the original firearm accidents (sex, age, place of occurrence, etc) are sufficient to separate them into homicides and accidents.<br/>
<br/>
Homicides in Sinaloa tend to occur on public streets:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-h1V15ZoeV3Q_UL1MnFXDxrI_AAAAAAAAF4c_0nh2-d5Okc4_s1600_homicide-place.png" imageanchor="1" ><img border="0" height="207" src="/images/blogger_images/4.bp.blogspot.com_-h1V15ZoeV3Q_UL1MnFXDxrI_AAAAAAAAF4c_0nh2-d5Okc4_s400_homicide-place.png" width="400"/></a></div>
<div class="separator" style="clear: both; text-align: left;">
However, accidentals deaths tend to occur all over the place except for 2007 and 2008 when there were a lot accidents on public streets (surprise, surprise):</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-Y44GbrPdrUY_UL1MPHOyx8I_AAAAAAAAF4U_mTn2bng1xbc_s1600_accident-place.png" imageanchor="1" ><img border="0" height="207" src="/images/blogger_images/2.bp.blogspot.com_-Y44GbrPdrUY_UL1MPHOyx8I_AAAAAAAAF4U_mTn2bng1xbc_s400_accident-place.png" width="400"/></a></div>
<br/>
Once we ignore the firearm accidents that occurred in 2007 and 2008 there are very few accidentals deaths by firearm in Sinaloa, and since the more data the better, I used all 1,834 firearms accidents in the rest of Mexico (excluding Chiapas because its vital statistics are a mess) together with all homicides and accidents by firearm in Sinaloa (excluding 2007 and 2008 obviously) to train a classifier. <br/>
<br/>
There are still some unresolved problems with this approach since the state of Baja California went from having 6 deaths by firearm in 2006, to 100 in 2007, to 6 again in 2008, in comparison homicides went from 303 in 2006 down to 243 in 2007. This could imply that Sinaloa is not the only state with mortality misclassifications and underlines just how difficult it is to get training data (I ignored any possible errors in the rest of the country for classifying the data)<br/>
<br/>
I ended up using the age, sex, place of occurrence of the injury, year of death, marital status and whether an autopsy was perfomed as the variables (including their interactions) in a penalized logistic regression to separate homicides from accidents. To avoid overfitting I separeted 30% of the data into a test dataset.<br/>
<br/>
These are the results of <a href="http://en.wikipedia.org/wiki/Cross-validation_(statistics)">crossvalidating</a> on the test database: <br/>
<pre> Reference
Prediction Accident Homicide
Accident 193 82
Homicide 166 933
Accuracy : 0.8195
95% CI : (0.7981, 0.8395)
No Information Rate : 0.7387
P-Value [Acc > NIR] : 8.951e-13
Kappa : 0.4942
Mcnemar's Test P-Value : 1.360e-07
<b>Sensitivity : 0.5376
Specificity : 0.9192</b>
Pos Pred Value : 0.7018
Neg Pred Value : 0.8490
Prevalence : 0.2613
Detection Rate : 0.1405
Detection Prevalence : 0.2001
'Positive' Class : Accident
</pre>
<br/>
Specificity measures the proportion of homicides which were correctly identified, which in this case is more important than misclassified accidents (sensitivity), since I’m trying to prove that the accidents are really homicides. With a specificity of 92% we can be pretty certain that a homicide classified as such is actually a homicide, but with a sensitivity of only 54% we might as well flip a coin when determining how certain we are that an accident is actually an accident. With such a low sensitivity we can consider the number of homicides in the table below as a sort of lower limit.<br/>
<br/>
<table border="0" cellspacing="0" cols="3"> <colgroup span="3" width="85"></colgroup> <tbody>
<tr> <td align="LEFT" height="16"><b>Year</b></td> <td align="LEFT"><b>Imputed Intent </b></td> <td align="LEFT"><b>Number of Deaths</b></td> </tr>
<tr> <td align="RIGHT" height="16">2007</td> <td align="LEFT">Accident</td> <td align="RIGHT">61</td> </tr>
<tr> <td align="RIGHT" height="16">2007</td> <td align="LEFT">Homicide</td> <td align="RIGHT">143</td> </tr>
<tr> <td align="RIGHT" height="16">2008</td> <td align="LEFT">Accident</td> <td align="RIGHT">20</td> </tr>
<tr> <td align="RIGHT" height="16">2008</td> <td align="LEFT">Homicide</td> <td align="RIGHT">178</td> </tr>
</tbody></table>
<br/>
The result of classifying the 204 and 198 firearm accidents in 2007 and 2008.<br/>
<br/>
As you can see the data looks much more reasonable now, though in 2008 there were still more drug homicides than total homicides, which may have been because some homicides were registered as accidents by a cause other than firearm (in around 23% of accidents the cause is left unspecified). When it comes to violence in Mexico it seems we watch shadows projected on a cave’s wall.<br/>
<br/>
Given that the sudden increase in homicides coincided with the end and start of a new year there may have been some sort of law or some legal means that made it ok to classify a homicide as an accident but that is just a matter of <a href="http://www.brainyquote.com/quotes/quotes/a/abrahamlin125047.html">calling a tail a leg.</a> But at this point I’m just speculating as to possible motives for recording a homicide as an accident, so I’ll stop.<br/>
<blockquote class="tr_bq">
I can’t confitm anything. There’s something to what you ask, but I can’t confirm anything. We have to perfom tests, you’ll have the data later. What we know is that it was an accident, but a very strange one because the body was dumped at the public hospital where he died. <br/>
<div style="text-align: right;">
<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">—</span><a href="http://www.riodoce.com.mx/index.php?option=com_content&task=view&id=11565">Jesús Antonio Aguilar Íñiguez, Chief of Sinaloa’s Investigative Police</a></div>
</blockquote>
<blockquote class="tr_bq">
No te puedo confirmar nada. Algo hay de lo que preguntas, pero no te puedo confirmar nada. Faltan pruebas periciales por realizar, después tendrás los datos. Lo que sabemos es que es un accidente, pero muy raro porque el cuerpo fue arrojado en el Seguro Social y ahí murió<br/>
<div style="text-align: right;">
<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">—</span><a href="http://www.riodoce.com.mx/index.php?option=com_content&task=view&id=11565">Jesús Antonio Aguilar Íñiguez, jefe de la Policía Ministerial del Estado</a></div>
</blockquote>
<span class="caps">P.S.</span> The data and code are available from my <a href="https://github.com/diegovalle/sinaloa-discrepancy">GitHub</a>
<div style="clear: both;"></div>
</div>Mexico’s most violent cities in 20112012-11-26T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2012-11-26:2012/11/mexicos-most-violent-cities-in-2011.html<div class="post-body entry-content" itemprop="articleBody">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-krJkdyc8IE8_ULLHxHcvRtI_AAAAAAAAFwE_GoQF8RhaTY8_s1600_cities.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="/images/blogger_images/1.bp.blogspot.com_-krJkdyc8IE8_ULLHxHcvRtI_AAAAAAAAFwE_GoQF8RhaTY8_s640_cities.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Note the log scale and that data are incomplete</td></tr>
</tbody></table>
The <a href="http://www.inegi.org.mx/est/contenidos/espanol/proyectos/continuas/vitales/bd/mortalidad/MortalidadGeneral.asp?s=est&c=11144"><span class="caps">INEGI</span></a> finally released homicide data at the municipality level, analyzing it by state turned out very similar results to the preliminary data released back in August, so I won’t repeat the<a href="http://blog.diegovalle.net/2012/08/preliminary-homicide-data-for-2011.html"> state level charts</a> I did back then, instead I will focus on the trends in violence at the metro area or big municipality level since both Tijuana and Ciudad Juárez had big declines in homicides <span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">—</span>though they are still very violent<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">—</span> and Monterrey, Acapulco and Veracruz saw big increases.<br/>
<a name="more"></a><br/>
As I <a href="http://blog.diegovalle.net/2012/07/machine-learning-for-better-homicide.html">previously wrote</a> there have been a lot deaths of unknown intent with characteristics similar to homicides since the drug war started, and 2011 was no exception: Coahuila went from registering 2 deaths of unknown intent in 2009 to 216 in 2011, Veracruz went from 197 to 747, Chiapas went from 2 to 614, Tamaulipas had 195 in 2011, and <span style="background-color: #ffd966;"><b>Mexico as a whole went from registering 2,376 deaths of unknown intent in 2007 to 5,630 in 2011</b>.</span><br/>
<br/>
We can also compare the number of homicides to the number of deaths in the recently cancelled drug war-related homicide database (only including the first 9 moths of 2011) to find out which states had more drug war deaths than total homicides, which in theory should be impossible<br/>
<br/>
<table border="1"><tbody>
<tr> <th>State </th> <th>Year </th> <th>Drug War-<br/>
Related Homicides </th> <th>Homicides</th> </tr>
<tr> <td>Coahuila </td> <td align="right">2011 </td> <td style="text-align: center;">572 </td> <td style="text-align: center;">478 </td> </tr>
<tr> <td>Sinaloa </td> <td align="right">2007 </td> <td style="text-align: center;">414 </td> <td style="text-align: center;">388 </td> </tr>
<tr> <td>Sinaloa </td> <td align="right">2008 </td> <td style="text-align: center;">1084 </td> <td style="text-align: center;">871 </td> </tr>
<tr> <td>Tamaulipas </td> <td align="right">2010 </td> <td style="text-align: center;">1209 </td> <td style="text-align: center;">1011 </td> </tr>
<tr> <td>Tamaulipas </td> <td align="right">2011 </td> <td style="text-align: center;">1108 </td> <td style="text-align: center;">830 </td> </tr>
</tbody></table>
<br/>
<!-- html table generated in R 2.15.2 by xtable 1.7-0 package -->One can also look at the data disaggregated by metro area or municipality (only showing those cities where drug war-related homicides exceeded all homicides by at least 15)<br/>
<!-- Sun Nov 25 16:20:18 2012 --><br/>
<table border="1"><tbody>
<tr> <th>City</th> <th>Year </th> <th>Drug War-<br/>
Related Homicides </th> <th>Homicides </th> </tr>
<tr> <td>Culiacán-Navolato </td> <td align="right">2008 </td> <td style="text-align: center;">654 </td> <td style="text-align: center;">460 </td> </tr>
<tr> <td>Culiacán-Navolato </td> <td align="right">2007 </td> <td style="text-align: center;">271 </td> <td style="text-align: center;">131 </td> </tr>
<tr> <td>San Fernando, Tamps </td> <td align="right">2011 </td> <td style="text-align: center;">292 </td> <td style="text-align: center;">159 </td> </tr>
<tr> <td>La Laguna </td> <td align="right">2011 </td> <td style="text-align: center;">633 </td> <td style="text-align: center;">509 </td> </tr>
<tr> <td>Veracruz </td> <td align="right">2011 </td> <td style="text-align: center;">261 </td> <td style="text-align: center;">164 </td> </tr>
<tr> <td>Valle Hermoso, Tamps </td> <td align="right">2011 </td> <td style="text-align: center;">95 </td> <td style="text-align: center;">14 </td> </tr>
<tr> <td>Reynosa </td> <td align="right">2010 </td> <td style="text-align: center;">154 </td> <td style="text-align: center;">92 </td> </tr>
<tr> <td>Miguel Alemán, Tamps </td> <td align="right">2010 </td> <td style="text-align: center;">110 </td> <td style="text-align: center;">58 </td> </tr>
<tr> <td>Mier, Tamps </td> <td align="right">2010 </td> <td style="text-align: center;">93 </td> <td style="text-align: center;">42 </td> </tr>
<tr> <td>Guerrero, Tamps </td> <td align="right">2010 </td> <td style="text-align: center;">45 </td> <td style="text-align: center;">0 </td> </tr>
<tr> <td>San Fernando, Tamps </td> <td align="right">2010 </td> <td style="text-align: center;">169 </td> <td style="text-align: center;">130 </td> </tr>
<tr> <td>Taxco de Alarcón, Gro </td> <td align="right">2010 </td> <td style="text-align: center;">75 </td> <td style="text-align: center;">38 </td> </tr>
<tr> <td>La Laguna </td> <td align="right">2010 </td> <td style="text-align: center;">704 </td> <td style="text-align: center;">673 </td> </tr>
<tr> <td>Mier, Tamps </td> <td align="right">2011 </td> <td style="text-align: center;">50 </td> <td style="text-align: center;">19 </td> </tr>
<tr> <td>Morelia </td> <td align="right">2011 </td> <td style="text-align: center;">104 </td> <td style="text-align: center;">78 </td> </tr>
<tr> <td>Ahumada, Chih </td> <td align="right">2009 </td> <td style="text-align: center;">27 </td> <td style="text-align: center;">4 </td> </tr>
<tr> <td>Guerrero, Tamps </td> <td align="right">2011 </td> <td style="text-align: center;">35 </td> <td style="text-align: center;">12 </td> </tr>
<tr> <td>Gustavo Díaz Ordaz, Tamps </td> <td align="right">2010 </td> <td style="text-align: center;">25 </td> <td style="text-align: center;">7 </td> </tr>
<tr> <td>Jiménez, Chih </td> <td align="right">2011 </td> <td style="text-align: center;">47 </td> <td style="text-align: center;">30 </td> </tr>
<tr> <td>Cosalá, Sin </td> <td align="right">2011 </td> <td style="text-align: center;">25 </td> <td style="text-align: center;">8 </td> </tr>
<tr> <td>Salvador Alvarado, Sin </td> <td align="right">2008 </td> <td style="text-align: center;">47 </td> <td style="text-align: center;">31 </td> </tr>
<tr> <td><strike>Sáric, Son </strike></td> <td align="right"><strike>2010 </strike></td> <td style="text-align: center;"><strike>30 </strike></td> <td style="text-align: center;"><strike>14 </strike></td> </tr>
<tr> <td>Camargo, Tamps </td> <td align="right">2010 </td> <td style="text-align: center;">30 </td> <td style="text-align: center;">15 </td> </tr>
</tbody></table>
*Saric, Sonora has been crossed out because the deaths were registered in <a href="http://www.diegovalle.net/drug-war-map.html#city=Tubutama%2C+Sonora&start=2010-01-15&end=2010-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=9&homtype=INEGI&clat=30.721636319197138&clong=-110.97125244140625">Tubutama</a><br/>
<br/>
With so many missing deaths I’ve opted to watermark the plots with a text that says ‘incomplete data’ since I could probably get better estimates by <a href="http://blog.diegovalle.net/2012/07/machine-learning-for-better-homicide.html">classifying the deaths of unknown intent</a>, but I need access to the raw data which is not available yet. In the plot at the top of the blog Tuxtla is the safest city, but with 112 deaths of unknown intent and only 10 homicides this is extremely likely to be wrong.<br/>
<br/>
By looking at the metro area homicide numbers you can miss diverging municipality level trends, so for La Laguna and Mexico City I’ve plotted the data grouped by state.<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/4.bp.blogspot.com_-_0m1zROlowQ_ULPNgjSsjXI_AAAAAAAAFyI_OtIhokJ_TCk_s1600_Rplot11.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="223" src="/images/blogger_images/4.bp.blogspot.com_-_0m1zROlowQ_ULPNgjSsjXI_AAAAAAAAFyI_OtIhokJ_TCk_s400_Rplot11.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The model is loess </td></tr>
</tbody></table>
Since inside a metro area people travel all around the city it is more
important to focus on the trend rather than the levels. In Mexico City the increase in homicides has been much more marked in the State of Mexico than in the Federal District, mostly due to trends in Ecatepec and Neza.<br/>
<br/>
In La Laguna violence in the part of the city situated in Coahuila (mainly Torreón) increased while violence in the Durango part decreased (mainly Gomez Palacio)<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/3.bp.blogspot.com_-JLjuvCH6O_c_ULPNlhpScaI_AAAAAAAAFyQ_oU_55VdAfNc_s1600_Rplot10.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="223" src="/images/blogger_images/3.bp.blogspot.com_-JLjuvCH6O_c_ULPNlhpScaI_AAAAAAAAFyQ_oU_55VdAfNc_s400_Rplot10.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The model is loes </td></tr>
</tbody></table>
Cities that saw big decreases in violence:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-kKcdfoXPhxM_ULJ0CdEENfI_AAAAAAAAFvI_Im-4Gi_vUEA_s1600_Rplot01.png" imageanchor="1" ><img border="0" height="270" src="/images/blogger_images/4.bp.blogspot.com_-kKcdfoXPhxM_ULJ0CdEENfI_AAAAAAAAFvI_Im-4Gi_vUEA_s400_Rplot01.png" width="400"/></a></div>
Cities that saw increases in violence:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-VK3hoSvyKMo_ULJ0Gd8jmSI_AAAAAAAAFvQ_EQ-XZAx0FjY_s1600_Rplot02.png" imageanchor="1" ><img border="0" height="270" src="/images/blogger_images/1.bp.blogspot.com_-VK3hoSvyKMo_ULJ0Gd8jmSI_AAAAAAAAFvQ_EQ-XZAx0FjY_s400_Rplot02.png" width="400"/></a></div>
Cities where the homicide rate didn’t vary much:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-l2IBYh9n8Fg_ULN0tWKWFBI_AAAAAAAAFwo_pqKVy9WtsSs_s1600_Rplot.png" imageanchor="1" ><img border="0" height="223" src="/images/blogger_images/3.bp.blogspot.com_-l2IBYh9n8Fg_ULN0tWKWFBI_AAAAAAAAFwo_pqKVy9WtsSs_s400_Rplot.png" width="400"/></a></div>
And the obligatory map:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-oC29GRPLNuo_ULJ0PYXT5LI_AAAAAAAAFvg_y_04dDmbqt4_s1600_Rplot04.png" imageanchor="1" ><img border="0" height="223" src="/images/blogger_images/3.bp.blogspot.com_-oC29GRPLNuo_ULJ0PYXT5LI_AAAAAAAAFvg_y_04dDmbqt4_s400_Rplot04.png" width="400"/></a></div>
<br/>
<br/>
<div style="clear: both;"></div>
</div>Mexico’s most dangerous cities for women2012-11-20T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2012-11-20:2012/11/mexicos-most-dangerous-cities-for-women.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-0CVd6g5PsHY_UKwi-qAsZPI_AAAAAAAAFtw_uwSoDbwRwrM_s1600_agerates.png" imageanchor="1" ><img border="0" height="400" src="/images/blogger_images/3.bp.blogspot.com_-0CVd6g5PsHY_UKwi-qAsZPI_AAAAAAAAFtw_uwSoDbwRwrM_s400_agerates.png" width="315"/></a></div>
Before the drug war the metro area of Toluca was by far the most violent city in Mexico for females and not Ciudad Juarez as commonly believed, in fact, when cities are ranked by their age-adjusted homicide rates from 1990 to 2006 (right before the drug war started) Juárez was not much more violent than Mexico City (Valle de México in the chart). <br/>
<br/>
<a name="more"></a>To construct the list I used the metropolitan areas as definied by the <span class="caps">INEGI</span> plus a made up metro area of the municipalities of Culiacán and Navolato, I also included municipalities like Durango which are not part of a metro area but have a population of more than 400,000.<br/>
<br/>
Since violence in Mexico was <a href="http://blog.diegovalle.net/2012/10/age-period-cohort-models-and-decline-of.html">declining before the drug war</a> it is also worthwhile to take a look at the yearly rates:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-nPqIer8oa0k_UKwUtnHU3fI_AAAAAAAAFs0_CzDrTGL57uc_s1600_metro-smallmultiples.png" imageanchor="1" ><img border="0" height="291" src="/images/blogger_images/3.bp.blogspot.com_-nPqIer8oa0k_UKwUtnHU3fI_AAAAAAAAFs0_CzDrTGL57uc_s400_metro-smallmultiples.png" width="400"/></a></div>
Notice how if we look at the drug war years Toluca actually had a lower female homicide rate than Monterrey in 2010, which used to be the safest metro area in Mexico.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-16DOOMXuh3U_UKwU1YX0_2I_AAAAAAAAFs8_piJpbekCMiM_s1600_homicides-mas.png" imageanchor="1" ><img border="0" height="240" src="/images/blogger_images/4.bp.blogspot.com_-16DOOMXuh3U_UKwU1YX0_2I_AAAAAAAAFs8_piJpbekCMiM_s400_homicides-mas.png" width="400"/></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-tscqyjaups0_UKwi2LpzX6I_AAAAAAAAFto_d_F4r23gNCU_s1600_agerates.png" imageanchor="1" ><img border="0" height="400" src="/images/blogger_images/2.bp.blogspot.com_-tscqyjaups0_UKwi2LpzX6I_AAAAAAAAFto_d_F4r23gNCU_s400_agerates.png" width="315"/></a></div>
<br/>
<div style="clear: both;"></div>
</div>Age-Period-Cohort models and the decline of violence2012-10-09T00:00:00+02:00Diego Valle-Jonestag:blog.diegovalle.net,2012-10-09:2012/10/age-period-cohort-models-and-decline-of.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-ZTUlPRR5js4_UHRRr1ZXkpI_AAAAAAAAFp0_D5U67n3lDPM_s1600_Rplot04.png" imageanchor="1" ><img border="0" height="256" src="/images/blogger_images/2.bp.blogspot.com_-ZTUlPRR5js4_UHRRr1ZXkpI_AAAAAAAAFp0_D5U67n3lDPM_s400_Rplot04.png" width="400"/></a></div>
Ever since the end of the Mexican Revolution and the Cristero War violence in Mexico inched down in fits and starts from a high of about <a href="http://www.mexicomaxico.org/Voto/Homicidios100M.htm">60 homicides per 100,000 people</a> to its lowest level sometime during the middle of the last decade (there’s some <a href="http://blog.diegovalle.net/2012/09/more-errors-in-mexican-mortality.html">uncertainty about the number of homicides in 2007</a>). Then, the drug war happened and the homicide rate shot straight up.<br/>
<br/>
After reading <i>The Better Angels of Our Nature: Why Violence Has Declined</i>, by Steven Pinker, and looking at <a href="http://www2.warwick.ac.uk/fac/arts/history/postgraduate/ma_studies/mamodules/hi971/topics/interpersonal/long-term-historical-trends-of-violent-crime.pdf">reviews of the literature</a> on homicide decline in Europe, it seemed to me as if some of the posited reasons for the decline of violence would involve strong cohort effects<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> —</span>each generation successively becoming less and less violent<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline !important; float: none; font-family: arial, sans-serif; font-size: x-small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">.</span> This immediately reminded me of Mexico, and so I decided to take a quick look at the data:<br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/3.bp.blogspot.com_-4SR6D9zoi6A_UGseCfGN5SI_AAAAAAAAFjg_QoHnzdOmyZw_s1600_surface223.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="/images/blogger_images/3.bp.blogspot.com_-4SR6D9zoi6A_UGseCfGN5SI_AAAAAAAAFjg_QoHnzdOmyZw_s400_surface223.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Each cohort group is connected by a loess line(only ages 12-60 are shown in the graph)</td></tr>
</tbody></table>
<br/>
<a name="more"></a>For a more formal analysis of the decline of violence I used homicide data from the <span class="caps">INEGI</span>/<span class="caps">SINAIS</span> at the national level from 1985 and at the state/municipality level from 1990 onwards. Since I’m interested in understanding the period before the drug war I discarded all data after 2006. As usual, there are some issues with the data:<br/>
<br/>
<ul>
<li>About 3% of homicides have no data corresponding to the age of the victim. I’ll simply ignore the missing data. The data also presents <a href="/images/blogger_images/2.bp.blogspot.com_-9XjNdkpH_x0_UHRzCoSUzkI_AAAAAAAAFqc_8tMqssViXss_s1600_age-rate-period.png">clumping of victim’s ages which end in 0 or 5</a>, to deal with this I grouped the data by 5 year age groups.</li>
<li>Some <a href="http://blog.diegovalle.net/2012/07/machine-learning-for-better-homicide.html">deaths of unknown intent</a> are probably homicides, for sure I could use multiple imputation to get better estimates of the number of homicides for the age-period-cohort model, but again I’ll ignore this.</li>
<li>Previous to 1994 there were a lot of homicides registered in the <span class="caps">INEGI</span> database <a href="/images/blogger_images/imgur.com_0VW2s.png">with no year of occurrence recorded</a>. I used the date of registration of the homicide as the year of occurrence before 1994 .</li>
<li>There are some <a href="http://blog.diegovalle.net/tag/mortality-errors.html">errors in the mortality database</a> where homicides are registered as accidents or simply missing. And of course the <a href="http://blog.diegovalle.net/2010/12/some-problems-with-mexican-mortality.html">Acteal Massacre</a> is missing from the homicide database.</li>
</ul>
<br/>
In countries with reliable statistics on offenders most women are
killed by men, so I focused on total homicide victims rather than each
sex since I see no reason why Mexico should be any different. To explore the data I plotted the age-adjusted homicide rates for each state of Mexico. Since the five states with the biggest declines in homicides all <a href="http://www.diegovalle.net/drug-war-map.html#city=Polygon&start=2010-01-15&end=2010-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=6&homtype=INEGI&clat=19.906246721165836&clong=-96.7304164711386&polygon=-94.1484375+15.996827733220593%2C-93.68701171875+17.260024118987044%2C-95.26904296875+17.53260283829153%2C-95.79638671875+18.013851941338817%2C-96.78515625+18.431264931987986%2C-97.42236328125+18.118298892018803%2C-98.356201171875+17.951154013794522%2C-98.707763671875+18.12874016774441%2C-98.982421875+18.368716953208857%2C-98.6748046875+18.54587709865494%2C-98.619873046875+19.00874677363432%2C-99.2845458984375+19.122967001585273%2C-99.3504638671875+19.291556949193534%2C-99.13485717773438+19.590699545167702%2C-99.05795288085938+19.396513826230773%2C-98.96182250976562+19.32395824616624%2C-98.9769287109375+19.080143640286064%2C-98.62948608398438+19.012641939704597%2C-98.65283203125+19.40558100225861%2C-98.68304443359375+19.558351452463494%2C-98.60614013671875+19.767851471727575%2C-98.70913696289062+19.88153886700858%2C-98.88766479492188+19.899617992091663%2C-99.02774047851562+20.017081906042804%2C-99.17330932617188+20.029984690068133%2C-99.35458374023438+19.80274147699627%2C-99.4603271484375+19.93060597328348%2C-99.45620727539062+20.13832620316427%2C-99.64022827148438+20.23499626834093%2C-99.86819458007812+20.28781718416226%2C-100.0867397133261+20.037898107201507%2C-100.2899867836386+20.29571753646128%2C-100.6415492836386+19.924323023949768%2C-101.1743861977011+19.96046942717407%2C-101.8335658852011+20.239033856239015%2C-102.0917445961386+20.362680608311315%2C-102.6190883461386+20.228725508945246%2C-103.0420619789511+20.110130463337367%2C-103.0145961586386+20.001769462539364%2C-102.7289516273886+19.862338533132775%2C-102.7564174477011+19.634855213402673%2C-102.5696498695761+19.3137635649681%2C-102.8607875648886+19.19448776622114%2C-103.1793910805136+18.96087230164082%2C-103.4925014320761+18.97645689948904%2C-103.7891322914511+18.63326086105811%2C-103.4979945961386+18.19285356585945%2C-100.7953578773886+16.862405285407124%2C-97.5983363930136+15.850418000793935%2C-96.2030727211386+15.511941022490356%2C-95.1813442055136+15.977201328986842%2C-94.1484375+15.996827733220593">lie in this contiguous area of Mexico</a> I highlighted them in blue. <br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-RB7sgGjTecE_UHBoyvnx_YI_AAAAAAAAFlA_a-WRRHwfKqM_s1600_states.png" imageanchor="1" ><img border="0" height="282" src="/images/blogger_images/3.bp.blogspot.com_-RB7sgGjTecE_UHBoyvnx_YI_AAAAAAAAFlA_a-WRRHwfKqM_s400_states.png" width="400"/></a></div>
The border states seem to follow a different dynamic than the rest of Mexico so I plotted the age-adjusted homicide rate for all municipalities whose head locality lies at least 200 km from the <span class="caps">U.S.</span> border:<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-RZovM_WpegQ_UHDsSYfZtGI_AAAAAAAAFnM_SMl6RLrZMSM_s1600_border.png" imageanchor="1" ><img border="0" height="221" src="/images/blogger_images/2.bp.blogspot.com_-RZovM_WpegQ_UHDsSYfZtGI_AAAAAAAAFnM_SMl6RLrZMSM_s400_border.png" width="400"/></a></div>
Since we have a bunch of contiguous states which saw big declines in violence and the municipalities near the <span class="caps">U.S.</span> border which saw increases, I’ll build two different age-period-cohort models for each area using the <a href="http://cran.r-project.org/web/packages/Epi/index.html">Epi package</a> (tough I could also use a multilevel model). Prior to building the age-period-cohort model I’ll visualize the four classic plots for the two areas of Mexico I mentioned.<br/>
<br/>
The southern states:<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-VovM2ex3HzY_UHBpEEtScrI_AAAAAAAAFlQ_QcffrR1H3HM_s1600_south3p.png" imageanchor="1" ><img border="0" height="250" src="/images/blogger_images/4.bp.blogspot.com_-VovM2ex3HzY_UHBpEEtScrI_AAAAAAAAFlQ_QcffrR1H3HM_s400_south3p.png" width="400"/></a></div>
Municipalities 200 km from the border:<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-8QjW70B97XQ_UHDo9FgGyxI_AAAAAAAAFmI_rQR6d8usOsg_s1600_border3p.png" imageanchor="1" ><img border="0" height="250" src="/images/blogger_images/3.bp.blogspot.com_-8QjW70B97XQ_UHDo9FgGyxI_AAAAAAAAFmI_rQR6d8usOsg_s400_border3p.png" width="400"/></a></div>
<ol>
<li>The top left plot shows the rate versus the age with each birth cohort group connected by a quadratic polynomial regression line. You can see a very clear pattern of each cohort being less violet in the southern states but not in the municipalities near the <span class="caps">U.S.</span> border.</li>
<li>The top right plot shows the rate versus the age, with each period connected. You can see that children have low homicide rates and young adults the highest. Near the <span class="caps">U.S.</span> border there is a drop in homicide rates after 40 years of age (but remember the cohort effects from the first plot!).</li>
<li>The bottom left plot shows the rate versus the period, with each age group connected. You can see that the decrease in violence occurred primarily among the ages with the highest rates in the southern states but not so much near the <span class="caps">U.S.</span> border.</li>
<li>The bottom right plot shows the rate versus the cohort, with the each age group connected. You can see how in the southern states each cohort suffered less violence than the rest, though not so much near the <span class="caps">U.S.</span> border (but keep in mind period effects!).</li>
</ol>
<br/>
After looking at those plots it seems appropriate to fit an Age-Period-Cohort model to separate the effects of each component:<br/>
<br/>
<ul>
<li>Age effect: Changes in the rates according to biological process of aging: children have low homicides rates, young adults a high one.</li>
<li>Cohort effect: Changes in the rates according to the birth date of each homicide victim. People born in the 50s were more likely to be murdered than people born in the 90s (well, until the drug war), which could reflect better schooling, higher literacy, etc.</li>
<li>Period effect: Changes in the rates affecting the entire population at a given point in time, related to historical events such as the arrival of the drug cartels to the border during the 90s and the problems with the Familia Michoacana before the drug war.</li>
</ul>
<br/>
In the model, I used the 1970 cohort as reference for the age and cohort effect, and 2003 as the period reference since that was the year before the expiration of the assault weapon ban, Chapo Guzmán killing the brother of the Juárez Cartel leader, La Barbie in Nuevo Laredo and the whole La Familia Michoacana thing.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-_Y4BX2ZUJGc_UHOaFNPdOfI_AAAAAAAAFpM_h8JRVj1WSDo_s1600_flowRoot3806.png" imageanchor="1" ><img border="0" height="277" src="/images/blogger_images/3.bp.blogspot.com_-_Y4BX2ZUJGc_UHOaFNPdOfI_AAAAAAAAFpM_h8JRVj1WSDo_s400_flowRoot3806.png" width="400"/></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br/>
From the chart we can see that the age pattern for homicides follows that found in <a href="http://www.unodc.org/documents/data-and-analysis/statistics/Homicide/Globa_study_on_homicide_2011_web.pdf">other countries</a> (Fig 3.3 page 41), once we control for cohort and period effects, with the highest risk of being a homicide victim for people in their early 20s. Interestingly, near the border people remain much much violent throughout their lives. Also note how much more violent southern Mexico was compared to the <span class="caps">U.S.</span> border. Infants living in the south where at a higher risk of dying of murder than people in their 20s near the <span class="caps">U.S.</span> border (controling for cohort and period effects). This probably because people in their 20s commit infanticide and also kill their peers in their 20s.<br/>
<br/>
Looking at the cohort effect there was a big decrease in violence by each successive generation. The period effect shows a rise in the early 90s which might have been related to the land reform enacted about that time (this is pure speculation) and the heightned importance of the Mexico-<span class="caps">US</span> border for traficking cocaine in the 90s, the model also shows a rise after 2003 which is very likely related to the whole breakup of the Federation and the rise of La Familia Michoacana as stated previously, though keep in mind its size compared to the cohort effect (they are on the same scale)<br/>
<br/>
<b>Note</b>: <i>I’m more interested in explaining the decline of
violence in Mexico rather than predicting the drug war, so the age
specific rates for the 1970 cohort are wrong after age 38 since 2008 was
the year homicide rates shot up because of the drug war.</i> <br/>
<br/>
One problem with looking at homicide victims is that we ignore data on those who committed the homicides. But in Mexico there is very little data on those who commit murder, <span style="background-color: yellow;">in 1930 the government detained about <a href="http://www.columbia.edu/~pp143/estadisticascrimen/EstadisticasSigloXX.htm">6,500 presumed murderers</a>, the same number as in 2011! </span>But in other parts of the world those who commit homicide have similar ages to their victims, in fact they are usually acquaintances (with the obvious exception of infants).<br/>
<br/>
There is also the possibility that rather than a reduction in violence the decrease in homicides could reflect better medical treatment, but Mexico also saw a reduction in all criminal activity:<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-YWptDIVFKsc_UHHm5bFT2KI_AAAAAAAAFn0_Jy_5HChNBVk_s1600_totalcrimes.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="/images/blogger_images/1.bp.blogspot.com_-YWptDIVFKsc_UHHm5bFT2KI_AAAAAAAAFn0_Jy_5HChNBVk_s400_totalcrimes.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The trendline was adjusted for seasonal effects and length of month</td></tr>
</tbody></table>
There is also the fact that the homicide rate in Mexico followed the homicide rates of Canada and the <span class="caps">U.S.</span> until the drug war. The consensus is that in Canada and the <span class="caps">U.S.</span> people really became less violent.<br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/2.bp.blogspot.com_-_nGvcqpQ354_UGr2yVgwLvI_AAAAAAAAFiQ_jhvzXKjKiBw_s1600_adjusted-can-mx-us-homicide.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="/images/blogger_images/2.bp.blogspot.com_-_nGvcqpQ354_UGr2yVgwLvI_AAAAAAAAFiQ_jhvzXKjKiBw_s400_adjusted-can-mx-us-homicide.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Data Sources: <span class="caps">INEGI</span>, <span class="caps">FBI</span>, and Statistics Canada (Criminal Justice)</td></tr>
</tbody></table>
So my best guess is that each cohort of Mexicans really was less violent than the previous ones. You certainly didn’t want to mess with someone born around the time of the revolution, but with each passing generation, for reasons still unknown, people became less and less violent until the late 80s and early 90s saw the birth of the <a href="http://www.mirrreybook.com/">mirrrey generation</a>: people more interested in aping the clothing style of <a href="http://grammar.about.com/od/shortpassagesforanalysis/a/fussellclassstyle.htm">uncivilized proles</a>, with their garrish logos and shirts with legible clothing, than in being violent.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-0WTIXh28XNI_UHBnebDymaI_AAAAAAAAFk4_s0de5jLUGcU_s1600_evolution.png" imageanchor="1" ><img border="0" height="321" src="/images/blogger_images/4.bp.blogspot.com_-0WTIXh28XNI_UHBnebDymaI_AAAAAAAAFk4_s0de5jLUGcU_s400_evolution.png" width="400"/></a></div>
The real tragedy is that what was supposed to be the least violent generation in recorded history is now the protagonist of the drug war:<br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-acixFGw5iJQ_UHBm3sFBuyI_AAAAAAAAFkw_AS0b-egeF-A_s1600_surface388.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="/images/blogger_images/1.bp.blogspot.com_-acixFGw5iJQ_UHBm3sFBuyI_AAAAAAAAFkw_AS0b-egeF-A_s400_surface388.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Each cohort group is connected by a loess line(only ages 12-60 are shown in the graph)</td></tr>
</tbody></table>
<br/>
<span class="caps">P.S.</span> You can download the code and data from <a href="https://github.com/diegovalle/age-period-cohort">GitHub</a>
<div style="clear: both;"></div>
</div>Drug use and seizures in the U.S.2012-09-25T00:00:00+02:00Diego Valle-Jonestag:blog.diegovalle.net,2012-09-25:2012/09/drug-use-and-seizures-in-us.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-w68X6tEGy9I_UGJBI5sm70I_AAAAAAAAFhY_eFEjUdx06C8_s1600_past-month.png" ><img border="0" height="250" src="/images/blogger_images/2.bp.blogspot.com_-w68X6tEGy9I_UGJBI5sm70I_AAAAAAAAFhY_eFEjUdx06C8_s400_past-month.png" width="400"/></a></div>
According to data from the <a href="http://www.oas.samhsa.gov/nhsda.htm">National Survey on Drug Use <span class="amp">&</span> Health 2001-2011</a> marijuana and heroin use are up, but cocaine and methampethamine use are down. <a href="http://www.oas.samhsa.gov/nhsda.htm"></a> (Data on methamphetamine consumption was statistically adjusted to account for survey changes) <b style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, Arial, Helvetica; font-size: medium; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-center; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-converted-space"></span></b><br/>
<a name="more"></a><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-Efk7G5QsTgU_UGJBH_7gnPI_AAAAAAAAFhQ_opB92Lbol8E_s1600_past-month-per.png" imageanchor="1" ><img border="0" height="250" src="/images/blogger_images/3.bp.blogspot.com_-Efk7G5QsTgU_UGJBH_7gnPI_AAAAAAAAFhQ_opB92Lbol8E_s400_past-month-per.png" width="400"/></a></div>
The spike in heroin users in 2006 is probably because the <span class="caps">NSDUH</span> is a household survey and as such it probably has quite a bit of error in capturing the real number of drug users. Since most drug consumption is due to addicts, I’m also showing data for those persons that were dependent or abused drugs.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-78JNgagE78A_UGJBG-NFQUI_AAAAAAAAFhI_yBcv9bdcGaM_s1600_abuse.png" ><img border="0" height="250" src="/images/blogger_images/1.bp.blogspot.com_-78JNgagE78A_UGJBG-NFQUI_AAAAAAAAFhI_yBcv9bdcGaM_s400_abuse.png" width="400"/></a></div>
For drug seizures I used data from the <a href="http://www.justice.gov/archive/ndic/pubs44/44849/44849p.pdf">National Drug Threat Assessment 2011</a> (page 50). The southwest region corresponds to the the <span class="caps">US</span>-Mexico border crossings and nearby counties. Basically seizures of all drugs along the <span class="caps">US</span>-Mexico border have gone up except for cocaine, probably because cocaine consumption has decreased. (Also see this <a href="http://www.animalpolitico.com/blogueros-plata-o-plomo/2012/09/12/enigmas-de-la-cocaina/">blog post</a> by Alejandro Hope for Mexican drug seizure data)<br/>
<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-X9dnJyEPgnQ_UGJBLCa85tI_AAAAAAAAFho_1cRsYMGSfIE_s1600_seizures.png" ><img border="0" height="250" src="/images/blogger_images/2.bp.blogspot.com_-X9dnJyEPgnQ_UGJBLCa85tI_AAAAAAAAFho_1cRsYMGSfIE_s400_seizures.png" width="400"/></a></div>
As a percentage change I decided to only show seizure data along the northern border for Marijuana and <span class="caps">MDMA</span> (ecstasy) since all the other numbers are so small. Also keep in mind that <span class="caps">MDMA</span> from Mexico grew from a very low starting point, though seizures are now about the size of those along the Northern border in 2006.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-fMVq3ctx5Gw_UGJBJ1LI5oI_AAAAAAAAFhg_1JtrTg3S90I_s1600_seizures-per.png" imageanchor="1" ><img border="0" height="250" src="/images/blogger_images/3.bp.blogspot.com_-fMVq3ctx5Gw_UGJBJ1LI5oI_AAAAAAAAFhg_1JtrTg3S90I_s400_seizures-per.png" width="400"/></a></div>
<div style="clear: both;"></div>
</div>Violence along Mexico’s Southern Border and Central America2012-09-07T00:00:00+02:00Diego Valle-Jonestag:blog.diegovalle.net,2012-09-07:2012/09/violence-along-mexicos-southern-border.html<div class="post-body entry-content" itemprop="articleBody">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/2.bp.blogspot.com_-_KA7-6sC3gc_UEkgdMbjoHI_AAAAAAAAFdU_nfJTvdMVaDc_s1600_central-america.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="332" src="/images/blogger_images/2.bp.blogspot.com_-_KA7-6sC3gc_UEkgdMbjoHI_AAAAAAAAFdU_nfJTvdMVaDc_s400_central-america.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Rates for Panama and Nicaragua are from 2009, all other countries 2010. Municipalities which are part of a metro area in Mexico are shown with the metro area homicide rate.</td></tr>
</tbody></table>
<span style='font-family: "Trebuchet MS",sans-serif;'><a href="https://www.google.com/fusiontables/embedviz?viz=MAP&q=select+col8+from+1iEBGSQhAGe5zhIVmAATEuw2klgl3maros_o6mYw&h=false&lat=15.041111671053436&lng=-86.79885912500004&z=6&t=1&l=col8&y=2&tmplt=1">Visit the interactive map of homicides</a></span> <br/>
<br/>
Having just posted on <a href="http://blog.diegovalle.net/2012/09/homicides-along-united-statesmexico.html">violence along Mexico’s northern border</a>, I figured it’s time to analyze what is happing south of Mexico where some countries have experienced sharp increases in homicides.<br/>
<br/>
<a name="more"></a>It’s a little bit fallacious to compare a country as big as Mexico with its southern neighbors since Mexico’s most populous state has more people living in it than the entire country of Guatemala, and all Mexican states are more populous than Belize, also the administrative divisions in each country are a little bit different:<br/>
<br/>
In Mexico the divisions go something like this:<br/>
<br/>
States -> Municipalities (Counties)<br/>
<br/>
In Guatemala:<br/>
<br/>
Deparments -> Municipalities<br/>
<br/>
In Belize:<br/>
<br/>
Districts -> Constituencies <br/>
<br/>
So in the map I’m showing at the top of this post I’m comparing level 1 divisions in Guatemala and Belize (departments and districts) with level 2 divisions in Mexico (municipalities).<br/>
<br/>
In addition, homicide records are not always reliable in both Mexico and Guatemala, in Mexico vital statistics records of homicides based on death certificates are usually more reliable than those compiled from police records, but in Chiapas –which borders Guatemala– police records consistently record a higher number of homicides. Looking at the monthly data one can see that some months both <a href="/images/blogger_images/3.bp.blogspot.com_-tRPL2ieMJuk_UDLjuC2HkDI_AAAAAAAAFag_iikgkQIqzoU_s1600_chiapas.png">transportation accidents and homicides fall to levels near zero</a>. I interpret this as Chiapas not being able to register every death, being one of Mexico’s poorest states this is not surprising. Chiapas health records are not up to par with the rest of the country.<br/>
<br/>
Homicides in Chiapas from different sources:<br/>
<table border="0" cellspacing="0" cols="3" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: arial; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><colgroup span="3" width="85"></colgroup><tbody>
<tr><td align="LEFT" height="16" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'><br/>
</span></span></td><td align="RIGHT" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'>2010</span></span></td><td align="RIGHT" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'>2011</span></span></td></tr>
<tr><td align="LEFT" height="16" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'><a href="http://www.inegi.org.mx/est/contenidos/proyectos/registros/vitales/mortalidad/default.aspx"><span class="caps">INEGI</span></a>(Vital Statistics)</span></span></td><td align="RIGHT" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'>197</span></span></td><td align="RIGHT" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'>185</span></span></td></tr>
<tr><td align="LEFT" height="16" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'><a href="http://www.secretariadoejecutivo.gob.mx/es/SecretariadoEjecutivo/Incidencia_Delictiva_Nacional_fuero_comun"><span class="caps">SNSP</span></a>(Police)</span></span></td><td align="RIGHT" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'>513</span></span></td><td align="RIGHT" style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><span style="font-size: small;"><span style='font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;'>613</span></span></td></tr>
</tbody></table>
<br/>
In Guatemala police records consistently document more homicides than vital statistics compiled by health authorities, though there are a lot of deaths of unknown intent. I interpret this as police records being more accurate than vital statistics.<br/>
<br/>
With all that said it’s now a matter of collecting the data. Lucky for me, <a href="http://multimedia.laprensagrafica.com/pdf/2011/03/20110322-PDF-Informe-0311-Homicidios-en-Centroamerica.pdf">La Prensa Gráfica</a> compiled homicide statistics for Central America and they used the police sources for Guatemala. So, it’s mostly a matter of downloading and merging shapefiles to analyze the data:<br/>
<br/>
<pre class="r geshifilter-R" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: #222222; font-family: monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; margin: 0px; orphans: 2; overflow: auto; padding: 10px; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; word-wrap: normal;">getMaps <span style="margin: 0px; padding: 0px;"><-</span> <a href="http://inside-r.org/r-doc/base/function" style="color: #0077df; margin: 0px; padding: 0px; text-decoration: none;"><span style="color: #003399; font-weight: bold; margin: 0px; padding: 0px;">function</span></a><span style="color: #009900; margin: 0px; padding: 0px;">(</span>codes<span style="color: #339933; margin: 0px; padding: 0px;">,</span> level<span style="color: #009900; margin: 0px; padding: 0px;">)</span> <span style="color: #009900; margin: 0px; padding: 0px;">{</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##Different column names to uniquely identify each group</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##depending on the level requested</span>
column.name <span style="margin: 0px; padding: 0px;"><-</span> <a href="http://inside-r.org/r-doc/base/ifelse" style="color: #0077df; margin: 0px; padding: 0px; text-decoration: none;"><span style="color: #003399; font-weight: bold; margin: 0px; padding: 0px;">ifelse</span></a><span style="color: #009900; margin: 0px; padding: 0px;">(</span>level <span style="margin: 0px; padding: 0px;">==</span> <span style="color: #cc66cc; margin: 0px; padding: 0px;">1</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> <span style="color: blue; margin: 0px; padding: 0px;">"NAME_0"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> <span style="color: blue; margin: 0px; padding: 0px;">"ISO"</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##Download the maps</span>
country.ll <span style="margin: 0px; padding: 0px;"><-</span> llply<span style="color: #009900; margin: 0px; padding: 0px;">(</span>codes<span style="color: #339933; margin: 0px; padding: 0px;">,</span>
<a href="http://inside-r.org/r-doc/base/function" style="color: #0077df; margin: 0px; padding: 0px; text-decoration: none;"><span style="color: #003399; font-weight: bold; margin: 0px; padding: 0px;">function</span></a><span style="color: #009900; margin: 0px; padding: 0px;">(</span>x<span style="color: #009900; margin: 0px; padding: 0px;">)</span> <a href="http://inside-r.org/r-doc/nlme/getData" style="color: #0077df; margin: 0px; padding: 0px; text-decoration: none;"><span style="color: #003399; font-weight: bold; margin: 0px; padding: 0px;">getData</span></a><span style="color: #009900; margin: 0px; padding: 0px;">(</span><span style="color: blue; margin: 0px; padding: 0px;">"GADM"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> path = <span style="color: blue; margin: 0px; padding: 0px;">"maps"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span>
country = x<span style="color: #339933; margin: 0px; padding: 0px;">,</span> level = level<span style="color: #009900; margin: 0px; padding: 0px;">)</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##Change the id of the maps since some are repeated and we need to</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##merge them, use ISO code as the unique identifier</span>
country.ll <span style="margin: 0px; padding: 0px;"><-</span> llply<span style="color: #009900; margin: 0px; padding: 0px;">(</span>country.ll<span style="color: #339933; margin: 0px; padding: 0px;">,</span>
<a href="http://inside-r.org/r-doc/base/function" style="color: #0077df; margin: 0px; padding: 0px; text-decoration: none;"><span style="color: #003399; font-weight: bold; margin: 0px; padding: 0px;">function</span></a><span style="color: #009900; margin: 0px; padding: 0px;">(</span>x<span style="color: #009900; margin: 0px; padding: 0px;">)</span> spChFIDs<span style="color: #009900; margin: 0px; padding: 0px;">(</span>x<span style="color: #339933; margin: 0px; padding: 0px;">,</span> str_c<span style="color: #009900; margin: 0px; padding: 0px;">(</span><a href="http://inside-r.org/r-doc/base/row.names" style="color: #0077df; margin: 0px; padding: 0px; text-decoration: none;"><span style="color: #003399; font-weight: bold; margin: 0px; padding: 0px;">row.names</span></a><span style="color: #009900; margin: 0px; padding: 0px;">(</span>x<span style="color: #009900; margin: 0px; padding: 0px;">)</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> x<span style="color: #009900; margin: 0px; padding: 0px;">[</span><span style="color: #009900; margin: 0px; padding: 0px;">[</span>column.name<span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #009900; margin: 0px; padding: 0px;">[</span><span style="color: #cc66cc; margin: 0px; padding: 0px;">1</span><span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##Merge the list of maps one by one</span>
<span style="color: black; font-weight: bold; margin: 0px; padding: 0px;">for</span><span style="color: #009900; margin: 0px; padding: 0px;">(</span>i <span style="color: black; font-weight: bold; margin: 0px; padding: 0px;">in</span> <span style="color: #cc66cc; margin: 0px; padding: 0px;">2</span><span style="margin: 0px; padding: 0px;">:</span><a href="http://inside-r.org/r-doc/base/length" style="color: #0077df; margin: 0px; padding: 0px; text-decoration: none;"><span style="color: #003399; font-weight: bold; margin: 0px; padding: 0px;">length</span></a><span style="color: #009900; margin: 0px; padding: 0px;">(</span>country.ll<span style="color: #009900; margin: 0px; padding: 0px;">)</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span><span style="color: #009900; margin: 0px; padding: 0px;">{</span>
<span style="color: black; font-weight: bold; margin: 0px; padding: 0px;">if</span><span style="color: #009900; margin: 0px; padding: 0px;">(</span>i <span style="margin: 0px; padding: 0px;">==</span> <span style="color: #cc66cc; margin: 0px; padding: 0px;">2</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span> <span style="color: #009900; margin: 0px; padding: 0px;">{</span>
map <span style="margin: 0px; padding: 0px;"><-</span> spRbind<span style="color: #009900; margin: 0px; padding: 0px;">(</span>country.ll<span style="color: #009900; margin: 0px; padding: 0px;">[</span><span style="color: #009900; margin: 0px; padding: 0px;">[</span><span style="color: #cc66cc; margin: 0px; padding: 0px;">1</span><span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> country.ll<span style="color: #009900; margin: 0px; padding: 0px;">[</span><span style="color: #009900; margin: 0px; padding: 0px;">[</span><span style="color: #cc66cc; margin: 0px; padding: 0px;">2</span><span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span>
<span style="color: #009900; margin: 0px; padding: 0px;">}</span> <span style="color: black; font-weight: bold; margin: 0px; padding: 0px;">else</span> <span style="color: #009900; margin: 0px; padding: 0px;">{</span>
map <span style="margin: 0px; padding: 0px;"><-</span> spRbind<span style="color: #009900; margin: 0px; padding: 0px;">(</span>map<span style="color: #339933; margin: 0px; padding: 0px;">,</span> country.ll<span style="color: #009900; margin: 0px; padding: 0px;">[</span><span style="color: #009900; margin: 0px; padding: 0px;">[</span>i<span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #009900; margin: 0px; padding: 0px;">]</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span>
<span style="color: #009900; margin: 0px; padding: 0px;">}</span>
<span style="color: #009900; margin: 0px; padding: 0px;">}</span>
map
<span style="color: #009900; margin: 0px; padding: 0px;">}</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##Codes for the Central American Countries</span>
country.codes <span style="margin: 0px; padding: 0px;"><-</span> <a href="http://inside-r.org/r-doc/base/c" style="color: #0077df; margin: 0px; padding: 0px; text-decoration: none;"><span style="color: #003399; font-weight: bold; margin: 0px; padding: 0px;">c</span></a><span style="color: #009900; margin: 0px; padding: 0px;">(</span><span style="color: blue; margin: 0px; padding: 0px;">"GTM"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> <span style="color: blue; margin: 0px; padding: 0px;">"BLZ"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> <span style="color: blue; margin: 0px; padding: 0px;">"HND"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> <span style="color: blue; margin: 0px; padding: 0px;">"SLV"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> <span style="color: blue; margin: 0px; padding: 0px;">"CRI"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> <span style="color: blue; margin: 0px; padding: 0px;">"NIC"</span><span style="color: #339933; margin: 0px; padding: 0px;">,</span> <span style="color: blue; margin: 0px; padding: 0px;">"PAN"</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##Get the maps of States/Districts</span>
map <span style="margin: 0px; padding: 0px;"><-</span> getMaps<span style="color: #009900; margin: 0px; padding: 0px;">(</span>country.codes<span style="color: #339933; margin: 0px; padding: 0px;">,</span> level = <span style="color: #cc66cc; margin: 0px; padding: 0px;">1</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span>
<span style="color: #666666; font-style: italic; margin: 0px; padding: 0px;">##Get the maps of the country outlines</span>
map.borders <span style="margin: 0px; padding: 0px;"><-</span> getMaps<span style="color: #009900; margin: 0px; padding: 0px;">(</span>country.codes<span style="color: #339933; margin: 0px; padding: 0px;">,</span> level = <span style="color: #cc66cc; margin: 0px; padding: 0px;">0</span><span style="color: #009900; margin: 0px; padding: 0px;">)</span></pre>
<br/>
Here’s a map showing the homicide rates from police sources in the Mexican states that border Guatemala and Belize:<br/>
<br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-qKVoi1GZVaU_UEkgkwpkVUI_AAAAAAAAFdc_qCIfBtihmGs_s1600_central-america-states.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="332" src="/images/blogger_images/1.bp.blogspot.com_-qKVoi1GZVaU_UEkgkwpkVUI_AAAAAAAAFdc_qCIfBtihmGs_s400_central-america-states.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Rates for Panama and Nicaragua are from 2009, Mexico from 2011, and all other countries 2010. Data for Central America from <a href="http://multimedia.laprensagrafica.com/pdf/2011/03/20110322-PDF-Informe-0311-Homicidios-en-Centroamerica.pdf">La Prensa Gráfica</a>, Mexico from <a href="http://www.secretariadoejecutivo.gob.mx/es/SecretariadoEjecutivo/Incidencia_Delictiva_Nacional_fuero_comun"><span class="caps">SNSP</span></a> </td></tr>
</tbody></table>
<br/>
If the police homicide statistics are closer to reality, then the border states of Mexico would have a homicide rate of 13 (about the same level as metro Mexico City). The departments and districts of Guatemala and Belize that touch the border with Mexico would have a combined homicide rate of 20 (about the same level as metro Detroit or New Orleans). And as you can see, the most violent part of Guatemala is closer to Honduras and El Salvador than Mexico, with the big exception of Petén. I wonder why the souther border hasn’t seen the increase in violence seen in other parts of Mexico? The real contrast is provided by Nicaragua.<br/>
<br/>
The intensity of drug trafficking does seem to be correlated with homicides according to this <a href="http://siteresources.worldbank.org/INTLAC/Resources/FINAL_VOLUME_I_ENGLISH_CrimeAndViolence.pdf">report by the World Bank</a> (page 13).<br/>
<br/>
For the time series of homicide rates I added a line representing the Mexican states of <a href="http://www.diegovalle.net/drug-war-map.html#city=Polygon&start=2010-01-15&end=2010-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375&polygon=-118.34033203125+33.90106918005482%2C-118.29638671875+31.23498317723463%2C-115.61572265625+28.684429398649353%2C-112.49560546875+28.41421700676992%2C-114.47314453125+31.272551046389815%2C-113.50634765625+31.159802615515293%2C-111.00146484375+26.81780603121026%2C-107.79345703125+23.234895661141312%2C-105.72802734375+21.241879373194685%2C-103.79443359375+21.118949331671576%2C-104.18994140625+22.83047609089846%2C-103.39892578125+24.480759867020126%2C-103.13525390625+25.59557137647338%2C-104.10205078125+27.287450647929447%2C-103.61865234375+31.12218994344478%2C-104.32177734375+33.572165993665266%2C-118.34033203125+33.90106918005482">Baja California, Sonora, Chihuahua, Sinaloa, Durango and Nayarit</a>
to serve as comparison, together these states would have a population
similar to that of Guatemala and about twice that of El Salvador or
Honduras, though their area is much bigger and their <span class="caps">GDP</span> per capita much
higher. Belize is a pretty small country, so keep in mind that while
the trend is increasing, the number of homicides went from 41 in 2000 to
129 in 2010. Another thing to keep in mind is that Central American
countries are very young and Ceteris Paribus having more young adults
will mean more homicides. <br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-gNMHbf0pUyk_UEoiM0WkhAI_AAAAAAAAFes_BFbDR56bFvw_s1600_hom-ca.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="221" src="/images/blogger_images/1.bp.blogspot.com_-gNMHbf0pUyk_UEoiM0WkhAI_AAAAAAAAFes_BFbDR56bFvw_s400_hom-ca.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sources: <a href="http://data.un.org/Data.aspx?d=UNODC&f=tableCode%3A1"><span class="caps">UNODC</span> Homicide Statistics 2012</a>, <span class="caps">INEGI</span></td></tr>
</tbody></table>
<span style="background-color: #ffe599;">Violence in Guatemala as of 2011 is at its lowest level since 2004.</span> But homicide rates are higher in all Central American countries compared to 2000:<br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-0RfP2d21hQs_UEoiUOn7IFI_AAAAAAAAFe0_fc9-5etR3_o_s1600_hom-ca-percentage.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="221" src="/images/blogger_images/1.bp.blogspot.com_-0RfP2d21hQs_UEoiUOn7IFI_AAAAAAAAFe0_fc9-5etR3_o_s400_hom-ca-percentage.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sources: <a href="http://data.un.org/Data.aspx?d=UNODC&f=tableCode%3A1"><span class="caps">UNODC</span> Homicide Statistics 2012</a>, <span class="caps">INEGI</span></td></tr>
</tbody></table>
<br/>
Here’s an <a href="https://www.google.com/fusiontables/embedviz?viz=MAP&q=select+col8+from+1iEBGSQhAGe5zhIVmAATEuw2klgl3maros_o6mYw&h=false&lat=15.041111671053436&lng=-86.79885912500004&z=6&t=1&l=col8&y=2&tmplt=1">interactive map</a>:<br/>
<br/>
<br/>
<iframe frameborder="no" height="500" scrolling="no" src="https://www.google.com/fusiontables/embedviz?viz=MAP&q=select+col8+from+1iEBGSQhAGe5zhIVmAATEuw2klgl3maros_o6mYw&h=false&lat=15.041111671053436&lng=-86.79885912500004&z=6&t=1&l=col8&y=2&tmplt=1" width="500"></iframe><br/>(Municipalities which are part of a metro area in Mexico are shown with the metro area homicide rate.)<br/>
<br/>
<span class="caps">P.S.</span> <a href="https://github.com/diegovalle/central-america">Data and code are available from GitHub</a>
<div style="clear: both;"></div>
</div>Homicides along the United States–Mexico border2012-09-04T00:00:00+02:00Diego Valle-Jonestag:blog.diegovalle.net,2012-09-04:2012/09/homicides-along-united-statesmexico.html<div class="post-body entry-content" itemprop="articleBody">
The drug war in Mexico has increased the homicide rate in several parts of the country, but one of the most affected regions has been those areas near the <span class="caps">U.S.</span> border.<br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/1.bp.blogspot.com_-1D9hh37KaTg_UEaFIXdcYYI_AAAAAAAAFb8_mmmY_VxZAGA_s1600_rate.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="/images/blogger_images/1.bp.blogspot.com_-1D9hh37KaTg_UEaFIXdcYYI_AAAAAAAAFb8_mmmY_VxZAGA_s400_rate.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sources: <span class="caps">CDC</span> / <span class="caps">INEGI</span>. For Mexican municipalities the distance to the border was measured from the main locality of each municipality, for <span class="caps">US</span> counties the distance to the border was measured from the centroid.</td></tr>
</tbody></table>
Violence has generally stayed on the Mexican side of the border. The trend in
homicides for all <span class="caps">U.S.</span> counties at least 160 km from the Mexican border has been downward since the drug war started.<br/>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="/images/blogger_images/3.bp.blogspot.com_-rTqHde1V5Sk_UEaFN-ALXfI_AAAAAAAAFcE_Bvr-SKfgKCI_s1600_percent.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="/images/blogger_images/3.bp.blogspot.com_-rTqHde1V5Sk_UEaFN-ALXfI_AAAAAAAAFcE_Bvr-SKfgKCI_s400_percent.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sources: <span class="caps">CDC</span> / <span class="caps">INEGI</span></td></tr>
</tbody></table>
Keep in mind that violence in Mexican municipalities at least 160km from the border was lower in
2006, when the drug war started, than in 1999.<br/>
<br/>
<span class="caps">P.S.</span> When referring to homicides in the <span class="caps">US</span> I included those deaths that were the result of legal interventions since in Mexico police/military interventions are usually counted as homicides.
<div style="clear: both;"></div>
</div>Preliminary homicide data for 20112012-08-20T00:00:00+02:00Diego Valle-Jonestag:blog.diegovalle.net,2012-08-20:2012/08/preliminary-homicide-data-for-2011.html<div class="post-body entry-content" itemprop="articleBody">
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-kmabbx2DB-o_UDLfW6ul8RI_AAAAAAAAFZ8_65UmXW4ibm8_s1600_historic.png" imageanchor="1" ><img border="0" height="300" src="/images/blogger_images/3.bp.blogspot.com_-kmabbx2DB-o_UDLfW6ul8RI_AAAAAAAAFZ8_65UmXW4ibm8_s400_historic.png" width="400"/></a></div>
The Mexican government through the <span class="caps">INEGI</span> just released <a href="http://www.inegi.org.mx/inegi/contenidos/espanol/prensa/Boletines/Boletin/Comunicados/Especiales/2012/agosto/comunica29.pdf">preliminary homicide data for 2011</a>. I feel bound to remind my readers that the government also released preliminary data in 2010, with the state of Chihuahua missing over a thousand murders, so the data should be interpreted as strictly preliminary.<br/>
<br/>
<a name="more"></a>According to the <span class="caps">INEGI</span> the homicide rate was 24 and the total number of homicides in 2011 was 27,199.<br/>
<br/>
Homicides actually went down in many of the most violent states in 2010. Chihuahua, Sinaloa, Baja California and Sonora all registered a drop in homicides in 2011, though they still are way above their longtime trendlines. In Chihuahua and Baja California it’s been claimed that part of the reason for the drop in homicides is the fact that the Sinaloa Cartel won control of the <i>plaza</i> (the drug smuggling routes and the political and law enforcement arrangements through which drug traffickers work). Since the Mexican government seems to be going after the Zetas rather than Sinaloa there seems to be one hell of an incentive to invade other cartel’s plazas.<br/>
<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/4.bp.blogspot.com_-W_yrJEPim1Q_UDLj4koBt8I_AAAAAAAAFao_am_jOjo6s-s_s1600_border.png" imageanchor="1" ><img border="0" height="200" src="/images/blogger_images/4.bp.blogspot.com_-W_yrJEPim1Q_UDLj4koBt8I_AAAAAAAAFao_am_jOjo6s-s_s320_border.png" width="320"/> </a></div>
<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-9xuR6-o-XdE_UDLj9J648oI_AAAAAAAAFaw_hzsPAu8NonM_s1600_coah.png" imageanchor="1" ><img border="0" height="200" src="/images/blogger_images/3.bp.blogspot.com_-9xuR6-o-XdE_UDLj9J648oI_AAAAAAAAFaw_hzsPAu8NonM_s320_coah.png" width="320"/></a></div>
Keep in mind that Tamaulipas had lots of deaths of unknown intent in 2010 and it is possible the same thing happened in 2011.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-UQ22bAyf7ow_UDLkBNjsZKI_AAAAAAAAFa4_unMwbVUUhEE_s1600_zetas.png" imageanchor="1" ><img border="0" height="200" src="/images/blogger_images/2.bp.blogspot.com_-UQ22bAyf7ow_UDLkBNjsZKI_AAAAAAAAFa4_unMwbVUUhEE_s320_zetas.png" width="320"/></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-lfMCUyBtC3s_UDLkFevd4xI_AAAAAAAAFbA_NCuNxeqdqog_s1600_jal.png" imageanchor="1" ><img border="0" height="200" src="/images/blogger_images/3.bp.blogspot.com_-lfMCUyBtC3s_UDLkFevd4xI_AAAAAAAAFbA_NCuNxeqdqog_s320_jal.png" width="320"/></a></div>
The rise in homicides in Michoacán and Guerrero used to justify the drug war now seem quaint and barely visible<br/>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/1.bp.blogspot.com_-G9cccX145Vw_UDLkJ9eu6QI_AAAAAAAAFbI_FTAMdCbdOTQ_s1600_southern.png" imageanchor="1" ><img border="0" height="200" src="/images/blogger_images/1.bp.blogspot.com_-G9cccX145Vw_UDLkJ9eu6QI_AAAAAAAAFbI_FTAMdCbdOTQ_s320_southern.png" width="320"/></a></div>
Veracruz in spite of all the bad press Veracruz doesn’t seem to be all that violent relative to other regions of Mexico, though I wonder how it breaks down at the municipality level? Without access to the mortality database I have no idea. According to the drug-war related homicide database the <a href="http://www.diegovalle.net/drug-war-map.html#city=Veracruz&start=2010-01-15&end=2010-12-15&mariguana=true&poppy=false&meth=false&cocaine=false&zoom=5&homtype=INEGI&clat=23.61796278994952&clong=-95.02734375">Veracruz metro area</a> is extremely violent.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-ehbR6qB81l4_UDLkRRhChBI_AAAAAAAAFbQ_NYsoo0TtD8Q_s1600_ver.png" imageanchor="1" ><img border="0" height="200" src="/images/blogger_images/2.bp.blogspot.com_-ehbR6qB81l4_UDLkRRhChBI_AAAAAAAAFbQ_NYsoo0TtD8Q_s320_ver.png" width="320"/></a></div>
The rate of increase has been higher for the State of Mexico than the Federal District, it would be interesting to break it down for the Mexico City metro area.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-ULJTESy-uug_UDLkW18M4LI_AAAAAAAAFbY_UfBgZDBoLiw_s1600_df.png" imageanchor="1" ><img border="0" height="200" src="/images/blogger_images/2.bp.blogspot.com_-ULJTESy-uug_UDLkW18M4LI_AAAAAAAAFbY_UfBgZDBoLiw_s320_df.png" width="320"/></a></div>
The data is not without problems, for example in Chiapas the vital statistics system doesn’t seem to be very good, with falls in both homicides and transportation accidents coinciding with the New Year. <br/>
<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/3.bp.blogspot.com_-tRPL2ieMJuk_UDLjuC2HkDI_AAAAAAAAFag_iikgkQIqzoU_s1600_chiapas.png" imageanchor="1" ><img border="0" height="200" src="/images/blogger_images/3.bp.blogspot.com_-tRPL2ieMJuk_UDLjuC2HkDI_AAAAAAAAFag_iikgkQIqzoU_s320_chiapas.png" width="320"/></a></div>
The number of homicides in the the <span class="caps">SNSP</span> database was greater than the number of homicides according to the <span class="caps">INEGI</span> in San Luis Potosí . This is very likely due to the high number of deaths of unknown intent, but I need access to the 2011 mortality database to be certain.<br/>
<br/>
Deaths of unknown intent and by homicide in San Luis Potosí<br/>
<table border="1"><tbody>
<tr> <th></th> <th><span class="caps">ANIODEF</span> </th> <th>Homicide </th> <th>Unknown </th> </tr>
<tr> <td align="right"><br/></td> <td align="right">2004 </td> <td align="right">135 </td> <td align="right">36 </td> </tr>
<tr> <td align="right"><br/></td> <td align="right">2005 </td> <td align="right">131 </td> <td align="right">66 </td> </tr>
<tr> <td align="right"><br/></td> <td align="right">2006 </td> <td align="right">160 </td> <td align="right">68 </td> </tr>
<tr> <td align="right"><br/></td> <td align="right">2007 </td> <td align="right">145 </td> <td align="right">3 </td> </tr>
<tr> <td align="right"><br/></td> <td align="right">2008 </td> <td align="right">200 </td> <td align="right">11 </td> </tr>
<tr> <td align="right"><br/></td> <td align="right">2009 </td> <td align="right">209 </td> <td align="right">17 </td> </tr>
<tr> <td align="right"><br/></td> <td align="right">2010 </td> <td align="right">357 </td> <td align="right" style="background-color: #ffd966;">99 </td> </tr>
</tbody></table>
<div style="clear: both;"></div>
</div>