Diego Valle-Jones's Bloghttps://blog.diegovalle.net/2014-11-10T00:00:00+01:00HoyodeCrimen.com - Crime information for the Distrito Federal2014-11-10T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2014-11-10:2014/11/hoyodecrimencom-crime-information-for.html<div class="post-body entry-content" itemprop="articleBody">
Crime information for the Federal District now has its own website with updated data<br/>
<br/>
<a href="https://hoyodecrimen.com/en">https://hoyodecrimen.com/en</a>/ - English version<br/>
<a href="https://hoyodecrimen.com/">https://hoyodecrimen.com/</a> - Spanish version<br/>
<br/>
I’ve also added a <a href="https://hoyodecrimen.com/en/trends">trends</a> section where you can look up which cuadrantes experienced a rise in crime<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_-_wyTP_VtNUY_VGC4js4s5sI_AAAAAAAAIW0_IbXYaZdg2Hk_s1600_https%2B%2B%2Bhoyodecrimen.com%2Ben%2Btrends.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="236" src="/images/blogger_images/3.bp.blogspot.com_-_wyTP_VtNUY_VGC4js4s5sI_AAAAAAAAIW0_IbXYaZdg2Hk_s1600_https%2B%2B%2Bhoyodecrimen.com%2Ben%2Btrends.png" width="400"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">There seems to a be big problem with car robberies near where the new airport will be built</td></tr>
</tbody></table>
<br/>
<br/>
Since the crime data comes from <span class="caps">FOIA</span> requests to the <span class="caps">SSPDF</span> (Mexico City Police), I’ve added free email announcements to keep you informed of when new data is available:<br/>
<br/>
<a href="http://eepurl.com/71l2n">Notifications in English</a><br/>
<a href="http://eepurl.com/7XKNT">Notifications in Spanish</a><br/>
<br/>
<br/>
There’s even an <a href="https://hoyodecrimen.com/api/"><span class="caps">API</span></a> with lots of cools stuff:<br/>
<a name="more"></a><br/>
<table border="1" class="docutils" style="background-color: white; border-collapse: collapse; border: 0px; color: #3e4349; font-family: Arial, sans-serif; font-size: 14px;"><thead valign="bottom">
<tr class="row-odd"><th class="head" style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Service</th><th class="head" style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Action</th><th class="head" style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;"><span class="caps">URI</span></th></tr>
</thead><tbody valign="top">
<tr class="row-even"><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Point in Polygon</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Given a longitude and latitude return the corresponding cuadrante and sector</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;"><div class="first last line-block" style="margin-bottom: 1em; margin-top: 1em;">
<div class="line">
<br/></div>
</div>
</td></tr>
<tr class="row-odd"><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Time Series</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Crime counts ordered by month of occurrence for a cuadrante or sector</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;"><div class="first last line-block" style="margin-bottom: 1em; margin-top: 1em;">
<div class="line">
<br/></div>
</div>
</td></tr>
<tr class="row-even"><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">List Cuadrantes or Sectores</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Sum of crimes that occurred in a cuadrante or sector for a specified period of time</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;"><div class="first last line-block" style="margin-bottom: 1em; margin-top: 1em;">
<div class="line">
<br/></div>
</div>
</td></tr>
<tr class="row-odd"><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Top Most Violent</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">A list of the cuadrantes and sectors with the highest rates (sectores), crime counts (cuadrantes) or change in crime counts (cuadrantes)</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;"><div class="first last line-block" style="margin-bottom: 1em; margin-top: 1em;">
<div class="line">
<br/></div>
</div>
</td></tr>
<tr class="row-even"><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;"><span class="caps">DF</span> data</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">A time series of the sum of all crimes that occurred in the Federal District</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;"><div class="first last line-block" style="margin-bottom: 1em; margin-top: 1em;">
<div class="line">
<br/></div>
</div>
</td></tr>
<tr class="row-odd"><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Enumerate</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;">Get a list of the names of all cuadrantes, sectores or crimes</td><td style="border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-width: 0px 0px 1px; padding: 1px 8px 1px 5px;"><div class="first last line-block" style="margin-bottom: 1em; margin-top: 1em;">
<div class="line">
<br/></div>
</div>
</td></tr>
</tbody></table>
<br/>
<span class="caps">P.S.</span> Yes, I know the Spanish translation is not complete, but I’ll finish it someday<br/>
<span class="caps">P.P.S.</span> The code is available at <a href="https://github.com/diegovalle/hoyodecrimen.api">GitHub</a>. It was built with Python + Flask + PostgreSQL + PotsGIS + Redis + D3 and an unholy combination of jQuery and AngularJS
<div style="clear: both;"></div>
</div>Crime at the municipal level2011-11-02T00:00:00+01:00Diego Valle-Jonestag:blog.diegovalle.net,2011-11-02:2011/11/crime-at-municipal-level.html<div class="post-body entry-content" itemprop="articleBody">
<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="http://www.diegovalle.net/maps/d3/crime-2011-aug.html" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="218" src="/images/blogger_images/4.bp.blogspot.com_-hOpOg0rQ5-o_Tq9aT9-6rvI_AAAAAAAAE20_7iCvKCmcUxc_s320_Screenshot+at+2011-10-31+20%253A31%253A21.png" width="320"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Click on the image to go to the interactive map</td></tr>
</tbody></table>
<br/>
The Mexican government recently released <a href="http://www.secretariadoejecutivo.gob.mx/es/SecretariadoEjecutivo/Incidencia_Delictiva_a_Nivel_Municipal">crime data</a> for 2011 at the municipality level. Sadly, it is no disaggregated by month, but beggars can’t be choosers. To analyze the data I made an <a href="http://www.diegovalle.net/maps/d3/crime-2011-aug.html">interactive map</a> with <a href="http://mbostock.github.com/d3/">d3</a> that includes the locations of the municipalities with the highest drug plant eradication and a 2d kernel density estimate of the location of meth labs based on newspaper reports.<br/>
<a name="more"></a><br/>
The data is not without problems since Acapulco actually came out on top as the most violent urban center (metro areas or municipalities not part of a metro area with more than 100,000 people) in Mexico, and while violence has certainly increased in the port city during the last few months —it may even have been the most violent city in Mexico during August— there is no way it is more violent than Ciudad Juarez taking into account the whole year.<br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="/images/blogger_images/2.bp.blogspot.com_-FUbDiEnztiw_Tq9L0f2flPI_AAAAAAAAE2c_LinAZrE-Dns_s1600_rates.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="320" src="/images/blogger_images/2.bp.blogspot.com_-FUbDiEnztiw_Tq9L0f2flPI_AAAAAAAAE2c_LinAZrE-Dns_s320_rates.png" width="274"/></a></div>
<br/>
Mexico has an epidemiological monitoring system, it is designed for transmissible diseases like influenza rather than violent deaths. There is always some delay in recording homicides since by law you have to perform an autopsy and the police are involved; however, Chihuahua is one of the few states that records homicides in a more or less timely manner, even if the data is still incomplete. Checking the data in the epidemiological system there were 1,176 murders in Juárez through July (the last month available) compared to 1,055 in the police database through August (one extra month).<br/>
<br/>
To believe the <span class="caps">SNSP</span> data you’d have to posit that doctors are making up homicide certificates and recording them each month in the epidemiological system so that the monthly numbers match the final data. Homicides in Juárez are down from the same period in 2010, but the police case data from the <span class="caps">SNSP</span> is plain wrong.<br/>
<br/>
A similar thing happened in 2010 when the <a href="http://www.secretariadoejecutivo.gob.mx/work/models/SecretariadoEjecutivo/Resource/131/1/images/CIEISP_2010.pdf"><span class="caps">SNSP</span> reported</a> 3,806 total murders in the state of Chihuahua compared to 4,427 <a href="http://www.presidencia.gob.mx/base-de-datos-de-fallecimientos/">drug-related</a> (or organized crime) murders. Stuff like this probably happens because there are many victims per police case. It’s pretty sad when doctors are better at recording crime than the police.<br/>
<br/>
Durango, Durango is another municipality that shows a big discrepancy, with a preliminary 421 homicides (including the <a href="http://justiceinmexico.org/2011/05/09/181-bodies-found-in-mass-graves-in-durango/">mass graves</a>) in the epidemiological system and 143 in the police database.<br/>
<br/>
Looking at other crimes it is not surprising that kidnappings were high in certain regions of Durango and Tamaulipas where mass graves were found. The Zacatecas, Morelia, and Villahermosa metro areas also have worryingly high kidnapping rates and are hot spots of drug cartel activity.<br/>
<br/>
And if you want to look at historical homicide data you can’t do better than this <a href="http://stanford.edu/~dkronick/mexico_crime/">map</a> by Stanford student Dorothy Kronick:<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="http://stanford.edu/~dkronick/mexico_crime/" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="212" src="/images/blogger_images/4.bp.blogspot.com_-AfUVEhl7GCw_Tq9Y7liiyeI_AAAAAAAAE2s_e-dx-Zw0PJg_s320_Screenshot+at+2011-10-31+20%253A24%253A17.png" width="320"/></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Map by Dorothy Kronick</td></tr>
</tbody></table>
<br/>
<span class="caps">P.S.</span> What’s happening in Atarjea, Guanajuato, by its location I’d guess meth labs.
<div style="clear: both;"></div>
</div>