Home

Awesome

ubigeo (R package)

<!-- badges: start --> <!-- badges: end -->

DOI

Installation

This package is not yet in CRAN, but you can install it by using devtools

devtools::install_github("jmcastagnetto/ubigeo")

Note

If you rather use a CSV, JSON or RDS file, these are (in Spanish) at: https://github.com/jmcastagnetto/ubigeo-peru-aumentado

Motivation

In Perú there is an official geographical location code for each Department, Province and District, but there exists de facto two widely use but different codification systems, one from INEI (Instituto Nacional de Estadística e Informática), and the other from RENIEC (REgistro Nacional de Identifación y Estado Civil).

This package contains datasets with the mappings from one to the other, at the level of Departments, Provinces and Districts. The datasets also include other useful information such as the classification in Regions and Macroregions (according to INEI and MINSA), the ISO-3166-2 and FIPS codes for regions, the surface area (in Km2), latitude, longitude and altitude (meters over sea level), and miscellaenous indicators as described below:

Also included is the INEI codification for small population centers (CCPP in the peruvian nomenclature)

Data structure

For Departments

FieldDescription
ineiUBIGEO (INEI)
reniecUBIGEO (RENIEC)
departmentName of the Department
iso_3166_2ISO-3166-2 code for the region
fipsFIPS code for the region
surfaceSurface in Km<sup>2</sup>
pop_density_2020Population Density (2020)
altitudeAltitude in meters above sea level
latitudeLatitude(South)
longitudeLongitude (West)
state_density_indexState Density Index
food_vulnerability_indexFood Insecurity Vulnerability Index
hdi_2019Human Development Index
pct_pobreza_totalPercentage of population in poverty
pct_pobreza_extremaPercentage of population in extreme poverty

For Provinces

FieldDescription
ineiUBIGEO (INEI)
reniecUBIGEO (RENIEC)
departmentName of the Department
provinceName of the Province
regionName of the Region
macroregion_ineiMacroregion for the region (INEI)
macroregion_minsaMacroregion for the region (MINSA)
iso_3166_2ISO-3166-2 code for the region
fipsFIPS code for the region
surfaceSurface in Km<sup>2</sup>
pop_density_2020Population Density (2020)
altitudeAltitude in meters above sea level
latitudeLatitude(South)
longitudeLongitude (West)
state_density_indexState Density Index
food_vulnerability_indexFood Insecurity Vulnerability Index
hdi_2019Human Development Index
pct_pobreza_totalPercentage of population in poverty
pct_pobreza_extremaPercentage of population in extreme poverty

For Districts

FieldDescription
ineiUBIGEO (INEI)
reniecUBIGEO (RENIEC)
departmentName of the Department
provinceName of the Province
districtName of the District
regionName of the Region
macroregion_ineiMacroregion for the region (INEI)
macroregion_minsaMacroregion for the region (MINSA)
iso_3166_2ISO-3166-2 code for the region
fipsFIPS code for the region
surfaceSurface in Km<sup>2</sup>
pop_density_2020Population Density (2020)
altitudeAltitude in meters above sea level
latitudeLatitude(South)
longitudeLongitude (West)
food_vulnerability_indexFood Insecurity Vulnerability Index
hdi_2019Human Development Index
pct_pobreza_totalPercentage of population in poverty
pct_pobreza_extremaPercentage of population in extreme poverty

For Small Population Centers (Centros Poblados = CCPP)

FieldDescription
inei_cppCPP UBIGEO (INEI)
inei_districtDistrict BIGEO (RENIEC)
departmentName of the Department
provinceName of the Province
districtName of the District
ccppName of the CCPP
typeType of CPP (Urban or Rural)
latitudeLatitude(South)
longitudeLongitude (West)

LICENSE: MIT