Learn R Programming

MicroDatosEs (version 0.8.15)

censo2010: Download data from 2010 Spanish Census from INE

Description

This function downloads the data from 2010 (or later) Spanish Census using the information provided by the Spanish Statistical Office (INE).

Usage

censo2010(file)

Value

tibble with all avaliable requested data where each row corresponds to an anonymised citizen.

Arguments

file

Character string with the name of the microdata file provided by the INE on the Census section. It allows either a path to a file, or literal data (single string or raw vector). It also allows compressed files in .gz, .bz2, .xz, or .zip format.

Author

Carlos Neira and Carlos J. Gil Bellosta

Details

This function reads microdata from the 2010 census in Spain. It was originally built using the metadata for 2010 file but it may be used for later years.

Note that the loaded object will be of considerable size and may require a computer from 8 GB of RAM. In order to avoid this kind of computational issues, you can also download the splitted version provided by the INE.

References

http://www.ine.es/prodyser/microdatos.htm

See Also

read_fwf to read fixed width files.

Examples

Run this code
# Downloaded \href{ftp://www.ine.es/temas/censopv/cen11/Microdatos_personas_nacional.zip}{data}
if (FALSE) {
raw <- censo2010("MicrodatosCP_NV_per_nacional_3VAR.txt")
summary(raw)
}

Run the code above in your browser using DataLab