This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ---------------------------------------------------------------------------- | |
## Descomposición de las diferencias en "Life Expectancy" entre dos poblaciones | |
## Usa las tabla de vida oficiales del INE como entrada .. | |
## ---------------------------------------------------------------------------- | |
rm(list = ls()) | |
require(pxR) | |
require(data.table) | |
require(ggplot2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Lectura del fichero texto plano. | |
DATA LIST FILE="./ma.txt" / | |
viv 1-6 | |
idv 7-8 | |
felev 9-17 | |
provincia 18-19 | |
fnac 20-24 | |
sexo 25-25 | |
lugNac 26-26 | |
anye 27-27 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Intrucciones de impotación SPSS para los fichero de microdatos, de texto plano, con Biografias Reproductivas de la cohorte censal andaluza de 2001 | |
* de la publicacion: https://www.juntadeandalucia.es/institutodeestadisticaycartografia/fecundidad/index.htm | |
* Datos: https://www.juntadeandalucia.es/institutodeestadisticaycartografia/descarga/fecundidad/andalucia/datosandalucia.zip | |
DATA LIST FILE="~/ma.txt" / | |
viv 1-6 | |
idv 7-8 | |
relREF 9-9 | |
fNac 10-14 | |
sexo 15-15 | |
annoe 16-16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ========================================================== | |
## Procesar: Fichero censal | |
## ========================================================== | |
# instalar 'memisc' si fuera necesario | |
if(!require(readr)){ install.packages("readr") ; require(readr)} | |
if(!require(memisc)){ install.packages("memisc") ; require(memisc)} | |
rm(list = ls()) | |
##-------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# require(devtools) | |
# install_github('SevillaR/Andaclima') | |
require(Andaclima) | |
rm(list = ls()) | |
stations <- getAndalusia_ACS() | |
metainfo <- getMetaData(provincia = stations$province.code, | |
estacion = stations$station.code , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rgdal) | |
require(ggmap) | |
rm(list = ls()) | |
## Descarga las secciones censales del censo de 2001, previa preparacion | |
## De la pagina: | |
## 'http://www.juntadeandalucia.es/institutodeestadisticaycartografia/clientedescarga/ | |
## Hay que seleccionar manualmente la capa : "Secciones Censales noviembre de de 2001 (censo)" y | |
## y marcar "extensión completa" esperar unos minutos, que se genere la petición y descargarla. | |
## O mejor copiar el nombre del fichero ZIP (con shapefiles) y modificar las dos linead dabajo de esta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Descarga y preparación de los datos del cubo OLAP en formato pcAxis, | |
# cuyo enlace se encuentra en la parte inferior izquierda de las paginas | |
# de tabulaciones de: "Estadísticas Longitudinales de Supervivencia y Longevidad en Andalucía" | |
# http://www.juntadeandalucia.es/institutodeestadisticaycartografia/consultasActividad.jsp?CodOper=660&sub=50517 | |
# install.packages('pxR') | |
require(pxR) # activar paquete de lectura de ficheros px-Axis | |
if (! dir.exists('datos') ) dir.create('datos') | |
download.file('http://www.juntadeandalucia.es/institutodeestadisticaycartografia/longevidad/pcaxis/consulta226.zip', destfile = 'datos/consulta226.zip') | |
unzip('datos/consulta226.zip', list = T) # Lista nombre de fichero |