— Jose Gonzalez

Archive
Statistics

Poverty and crime in Mexico

How safe is Mexico? That is a frequent question people ask me. There is even a  website about it  (see this blog post). So I’ve decided it was time to go one step further and make an interactive map (click here for full screen) of poverty and crime in Mexico.

The objective was to see which municipalities have higher crime rates and visually check if municipalities with higher crime rates also have high poverty rates. While unfortunately,  the most recent poverty data at the municipality level is for 2010 while the crime data, at the same level, is only available for 2011, 2012, 2013, I was still able to glean some interesting insights.

The interactive map´s main take away is that high rates of selected crimes are concentrated in just a few municipalities. Moreover, there appears to be no direct link to high poverty rates.

To do the analysis I used R, QGIS and TileMill, all that code is freely available in my github account. If you are interested in learning more about how I made the map, keep reading!

Read More

The White House This post shows how to use Google Maps‘ API with R making some tweaks to this function. Combine the first part with sapply or Plyr and it becomes a very powerful tool in just a few lines of code. You can find a gist in RMarkdown with the code here or click below to continue reading.

Read More

onesecond in the internetIf you were wondering what big data is, check out this post for an example. Big data is characterized by its volume, velocity, variety.  The mentioned blog post indicates how many Facebook Likes, Google searches, YouTube videos, etc. happen by second. This is a lot of data waiting to to be mined.

Read More

Geek vs nerd

See the differences between geek and nerd using Twitter data via Slackpropagation

Read More

Answer: Facebook 45% of world wide web users went to it yesterday.. and it gets about 5% more than google.

fbrank

Read More

Read More

Excellent article by Stephen Worlfram about facebook statistics: ages, friends posts, interests, etc.

 

Read More

datascientist

 

Source: Big Data and Data Science

Read More

There are inconsistencies  in the available database of Encuesta Nacional de Victimización y Percepción sobre Seguridad Pública 2012 (ENVIPE)

Using the PSUs, weights and strata specified (download the “Descripción de archivos¨ file). The estimates differ signficantly from the ones stated in ¨Tabulados básicos” For example, in Tabulados básicos, the total population of 18+ is 76,228,271 and with the database provide (¨Microdatos¨) is 64,333,905.

The above implies that the number of 18+ people decreased from 74,500,383 to 64,333,905 in just one year. Something is going wrong here.

Read More

Bubble map of the Metro

I used R and ggplot2 to make a bubble map of Mexico City’s Metro passenger count from January to February 2012. The statistics are stunning, some stations for example Indios Verdes, reached 10 million passengers in jus three months. You can see the code below and get the data for the project here.

Read More