-
Notifications
You must be signed in to change notification settings - Fork 6
/
censo2010.Rd
44 lines (42 loc) · 1.65 KB
/
censo2010.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/censo2010.R
\name{censo2010}
\alias{censo2010}
\title{Download data from 2010 Spanish Census from INE}
\usage{
censo2010(file)
}
\arguments{
\item{file}{Character string with the name of the microdata file provided by the INE on the
\href{http://www.ine.es/censos2011_datos/cen11_datos_microdatos.htm}{Census} section. It allows either a path to a file,
or literal data (single string or raw vector). It also allows compressed files in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} format.}
}
\value{
\code{\link[tibble]{tibble}} with all avaliable requested data where each row corresponds to an anonymised citizen.
}
\description{
This function downloads the data from 2010 (or later) Spanish Census using the information provided by the Spanish Statistical Office (INE).
}
\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.
}
\note{
The \code{file} parameter allows any flat file with fixed width.
}
\examples{
# Downloaded \\href{ftp://www.ine.es/temas/censopv/cen11/Microdatos_personas_nacional.zip}{data}
\dontrun{
raw <- censo2010("MicrodatosCP_NV_per_nacional_3VAR.txt")
summary(raw)
}
}
\references{
http://www.ine.es/prodyser/microdatos.htm
}
\seealso{
\code{\link[read_fwf]{readr}} to read fixed width files.
}
\author{
Carlos Neira and Carlos J. Gil Bellosta
}