This function allows you to add a geom variable with a code variable of "zona", "barrio", "localidad", "segmentos", "secciones" or "departamentos".

add_geom(data, unit, variable, crs = 32721)

Arguments

data

data.frame

unit

spatial unit of data, may be: "Departamentos", "Secciones", "Secc MVD 2004", "Segmentos", "Segm MVD 2004", "Segm URB INT 2004", "Zonas", "Zonas MVD 2004", "Zonas URB INT 2004", "Localidades pg", "Municipios" o "Barrios".

variable

Variable name of unit code (without duplicates)

crs

Coordinates Refence Sistem, usually in region 32721 or 4326 (default 32721)

Value

data.frame

Details

Disclaimer: This script is not an official INE product. Aviso: El script no es un producto oficial de INE.

Examples

# \donttest{ pobre_x_dpto <- get_estimation_mean(variable = "pobre06", by.x = "nomdpto", level = "h") %>% dplyr::filter(pobre06 == "No pobre")
#> These confidence intervals are only an approximation of the correct confidence intervals #> that arise from fully defining the sample design
pobre_x_dpto_geo <- add_geom(data = pobre_x_dpto, unit = "Departamentos", variable = "nomdpto")
#> Reading layer `departamentos' from data source `https://mapas.mides.gub.uy/geoserver/IDE/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=IDE:departamentos' using driver `GML' #> Simple feature collection with 19 features and 9 fields #> geometry type: MULTIPOLYGON #> dimension: XY #> bbox: xmin: 366582.2 ymin: 6127919 xmax: 858252.1 ymax: 6671738 #> CRS: EPSG:32721
# }