diegovalle / death.index

Clean the mortality database from the SSA/INEGI

Home Page:www.diegovalle.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This program cleans up the mortality database from the SSA/INEGI

run_all.R ##downloads and cleans the mortality files

  • Upload zip of all the zip files in the ssa-database directory
  • Upload zip of all the csv.bz2 files in the clean-data directory
  • Upload zip of all the RData files in the cache directory
  • Set registerDoMC as 7 (64Gb)

Cleaned Data

Once the program is run you'll find a bunch of files in the clean-data directory:

  • mortality-database.sqlite : All registered deaths in Mexico from 2004 to 2010 in sqlite format
  • injury-intent.csv.bz2: Injury intent (accidents, suicides, homicides, legal interventions and deaths of unspecified injury intent) deaths in csv format
  • di[year].sinais.csv.bz: The raw 'uncleaned' mortality files (see below) in csv format

Marital status was recorded differently in 2012 (A separated category was added) Insurance was recorded differently starting in 2012 (IMSS oportunidades added) Education was recorded differently starting in 2012

Data Sources

The mortality files are from the SSA/INEGI available at

SINAIS

If for some reason the files are not downloaded automatically you can download them manually and place the files in the "ssa-database" directory. The files you need to dowload are:

2004

2005

2006

2007

2008

2009

2010

Author: Diego Valle-Jones

About

Clean the mortality database from the SSA/INEGI

www.diegovalle.net

License:MIT License


Languages

Language:R 99.0%Language:Makefile 0.7%Language:Dockerfile 0.3%