Ir al contenido

INEI does not publish the 2017 Census microdata as a download, only a web REDATAM query and tables. CELADE (ECLAC) distributes the full census database in REDATAM format at redatam.org. fa_redatam() downloads it once into the cache (678 MB, SHA-256 checked), unzips it and runs a REDATAM query on it with the redatamx package.

Uso

fa_redatam(query = NULL, cache = fa_cache())

Argumentos

query

A REDATAM query. NULL lists the variables of every entity instead.

cache

Cache folder, see fa_cache().

Valor

A data frame: the table returned by redatamx::redatam_query(), or with query = NULL one row per variable with its entity.

Detalles

redatamx is only suggested: it downloads the REDATAM engine when it is installed. Install it with install.packages("redatamx").

Queries use REDATAM syntax, for example "freq PERSONA.C5P2" (sex) or "freq DEPARTAM.CCDD by PERSONA.C5P2". The entities are DEPARTAM, PROVINCI, DISTRITO, VIVIENDA, HOGAR and PERSONA.

Ejemplos

if (FALSE) { # \dontrun{
fa_redatam("freq PERSONA.C5P2")   # 14 450 757 men and 14 931 127 women
v <- fa_redatam()                  # what is there
} # }