Skip to content

diegovalle/new.crimenmexico

Repository files navigation

new.crimenmexico

Build Status

About

This repository contains the source code for generating the website elcri.men, which provides data and analysis on crime in Mexico.

Quick Start with Docker

The easiest way to recreate the website is to use the Docker container:

docker pull diegovalle/elcrimen-docker
docker run -it diegovalle/elcrimen-docker

Building the Website

Once inside the Docker container:

  1. Change to the project directory:

    cd /home/rstudio/new.crimenmexico
  2. Get the latest version:

    git pull
  3. Build the website:

    make

The generated website will be available in the elcri.men/public subdirectory.

Building Without Deployment Access

If you don't have the private key to deploy to elcri.men, follow these steps:

cd ~/new.crimenmexico
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
git pull
make download_csv download_inegi clean_data analysis website

Project Structure

  • /elcri.men: Gatsby website for elcri.men
  • /clean: Python scripts for downloading data and processing or it
  • /data: Raw and processed data files
  • /db: SQLite database with the processed data
  • /R: R scripts for data analysis and processing

Data Sources

Víctimas y unidades robadas, nueva metodología

Mortalidad

ENVIPE

License

MIT License

Contact

Contact Form

How to update when a new ENVIPE comes out

  • Open the pdf presentation and copy the crime rate to /tasa-crimen/
  • Open the Excel files with the 'estimaciones' and standard errors and copy table 1.20 to /envipe/
  • Sometimes the 'secustro' data is only found in the main presentation pdf
  • Open the SNSP and Unidades robadas pdf report and copy them to /envipe/
  • Look up the car robbery data at the AMIS site and copy them to /envipe/