| Title: | Programmatic Access to Spatial Data from 'SDOT-PCM' Peru |
|---|---|
| Description: | Provides programmatic access to official geographic information from the Secretariat of Demarcation and Territorial Organization ('SDOT') of the Presidency of the Council of Ministers ('PCM') of Peru. Facilitates the download, reading, and manipulation in 'R' of vector layers on geographic modeling, National Institute of Statistics and Informatics ('INEI') census limits, population centers, infrastructure, risks, hazards, economic activities, mobility flows, and rural cadastre. IMPORTANT: 'INEI' census limit information is referential and does not constitute official territorial limits nor has legal demarcatory effect. |
| Authors: | Paul Efren Santos Andrade [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-6635-0375>) |
| Maintainer: | Paul Efren Santos Andrade <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-11-25 06:12:39 UTC |
| Source: | https://github.com/PaulESantos/rsdot |
Deletes all downloaded files in the rsdot cache directory.
clear_rsdot_cache()clear_rsdot_cache()
Invisible TRUE if deleted successfully.
## Not run: clear_rsdot_cache() ## End(Not run)## Not run: clear_rsdot_cache() ## End(Not run)
Downloads and loads information on airfields in Peru updated to the year 2022, prepared by the Ministry of Transport and Communications (MTC). Data includes POINT type geometry and information on airports, airfields, and heliports. Allows stepwise filtering by department, province, and district.
get_aerodromos( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_aerodromos( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CUSCO", "HUANUCO", "ICA", "JUNIN", "LA LIBERTAD", "LAMBAYEQUE",
"LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA", "PASCO", "PIURA", "PUNO",
"SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter within the specified province(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it in cache during the R session. Data is in GeoPackage (.gpkg) format.
Cache is stored in: tools::R_user_dir("rsdot", which = "cache")/aerodromos/
NOTE: Geometries are POINT type and represent the location of each airfield.
An sf (simple feature) object with POINT type geometry containing
airfield information, including:
POINT geometry (airfield coordinates)
nombre: Airfield name
label: Full descriptive label
tipo: Type of facility (INTERNATIONAL AIRPORT, AIRFIELD, HELIPORT)
codidep: Department code
nombdep: Department name
nombprov: Province name
nombdist: District name
escala: Airfield scale
lat: Latitude
lon: Longitude
estado: Operating status (OPERATIONAL, etc.)
administ: Managing entity
jerarquia: Hierarchy (NATIONAL, etc.)
titular: Ownership type (PUBLIC, PRIVATE)
If multiple departments are requested, it returns a combined sf object.
Ministry of Transport and Communications (MTC). Airfields of Peru 2022. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_departamentos, get_provincias,
get_distritos, read_sf
## Not run: # See available departments get_aerodromos() # Load airfields of a full department aero_cusco <- get_aerodromos(departamento = "CUSCO") # Filter by specific province aero_prov_cusco <- get_aerodromos( departamento = "CUSCO", provincia = "CUSCO" ) ## End(Not run)## Not run: # See available departments get_aerodromos() # Load airfields of a full department aero_cusco <- get_aerodromos(departamento = "CUSCO") # Filter by specific province aero_prov_cusco <- get_aerodromos( departamento = "CUSCO", provincia = "CUSCO" ) ## End(Not run)
Downloads and loads information on district capitals identified in the 2017 Population and Housing Census of the National Institute of Statistics and Informatics (INEI). Data includes demographic and geographic information of the capitals at the departmental, provincial, and district levels, with POINT type geometry.
get_capitales( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_capitales( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of province(s) to filter the results (optional). It is applied after loading the data. |
distrito |
Character vector. Name(s) of district(s) to filter the results (optional). It is applied after loading the data. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it in cache during the R session. Data is in GeoPackage (.gpkg) format.
Cache is stored in: tools::R_user_dir("rsdot", which = "cache")/capitales/
NOTE: Geometries are POINT type and represent the approximate geographic location of the capitals according to the 2017 Census. Population data correspond to the census year.
An sf (simple feature) object with POINT type geometry
containing district capital information, including:
POINT geometry (location of the capital)
gid: Unique record identifier
ubigeo: Geographic location code (6 digits)
nombdep: Department name
nombprov: Province name
nombdist: District name
codccpp: Population center code (10 digits)
cen_pob: Population center name
pob: Total population
capital: Capital type (1=departmental, 2=provincial, 3=distrital)
If multiple departments are requested, it returns a combined sf object.
INEI. 2017 Population and Housing Census. National Institute of Statistics and Informatics.
SDOT Viewer: https://geosdot.servicios.gob.pe/visor/
get_centros_poblados, get_departamentos,
read_sf
## Not run: # See available departments get_capitales() # Load capitals of a department capitales_cusco <- get_capitales(departamento = "CUSCO") # Load multiple departments capitales_sur <- get_capitales( departamento = c("CUSCO", "PUNO", "AREQUIPA") ) # Filter by province capitales_lima_prov <- get_capitales( departamento = "LIMA", provincia = "LIMA" ) # Filter by district capital_cusco_dist <- get_capitales( departamento = "CUSCO", provincia = "CUSCO", distrito = "CUSCO" ) # Visualization with ggplot2 library(ggplot2) library(dplyr) # Map of capitals by hierarchy ggplot(capitales_cusco) + geom_sf(aes(color = factor(capital), size = pob), alpha = 0.7) + scale_color_manual( values = c("1" = "red", "2" = "blue", "3" = "green"), labels = c("Departmental", "Provincial", "Distrital"), name = "Capital Type" ) + scale_size_continuous(range = c(1, 10), name = "Population") + labs( title = "Capitals of Cusco by Hierarchy", subtitle = "2017 Population and Housing Census", caption = "Source: INEI | Visor - SDOT" ) + theme_minimal() ## End(Not run)## Not run: # See available departments get_capitales() # Load capitals of a department capitales_cusco <- get_capitales(departamento = "CUSCO") # Load multiple departments capitales_sur <- get_capitales( departamento = c("CUSCO", "PUNO", "AREQUIPA") ) # Filter by province capitales_lima_prov <- get_capitales( departamento = "LIMA", provincia = "LIMA" ) # Filter by district capital_cusco_dist <- get_capitales( departamento = "CUSCO", provincia = "CUSCO", distrito = "CUSCO" ) # Visualization with ggplot2 library(ggplot2) library(dplyr) # Map of capitals by hierarchy ggplot(capitales_cusco) + geom_sf(aes(color = factor(capital), size = pob), alpha = 0.7) + scale_color_manual( values = c("1" = "red", "2" = "blue", "3" = "green"), labels = c("Departmental", "Provincial", "Distrital"), name = "Capital Type" ) + scale_size_continuous(range = c(1, 10), name = "Population") + labs( title = "Capitals of Cusco by Hierarchy", subtitle = "2017 Population and Housing Census", caption = "Source: INEI | Visor - SDOT" ) + theme_minimal() ## End(Not run)
Downloads and loads spatial cadastral parcels and property polygons from the official Rural Cadastre (Catastro Rural) of the Ministry of Agrarian Development and Irrigation (MIDAGRI), integrated into the SDOT platform.
get_catastro_rural( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_catastro_rural( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of department(s) to filter. Optional. |
provincia |
Character vector. Name(s) of province(s) to filter. Optional. |
distrito |
Character vector. Name(s) of district(s) to filter. Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
Cache is stored under tools::R_user_dir("rsdot", which = "cache")/catastro_rural/.
An sf (simple feature) object containing cadastral parcels.
MIDAGRI. Sistema Catastral Rural de Predios Individuales y Comunales. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_distritos, get_departamentos
## Not run: # Load rural cadastre for a department catastro_cusco <- get_catastro_rural(departamento = "CUSCO") ## End(Not run)## Not run: # Load rural cadastre for a department catastro_cusco <- get_catastro_rural(departamento = "CUSCO") ## End(Not run)
Downloads and loads information on population centers of Peru from the 2017 Population and Housing Census of the National Institute of Statistics and Informatics (INEI). Data includes demographic and geographic information at the departmental, provincial, and district levels, with POINT type geometry.
get_centros_poblados( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_centros_poblados( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of province(s) to filter the results (optional). It is applied after loading the data. |
distrito |
Character vector. Name(s) of district(s) to filter the results (optional). It is applied after loading the data. |
show_progress |
Logical. If |
force_update |
Logical. If |
La función descarga datos desde OSF (Open Science Framework) y los almacena en caché durante la sesión de R. Los datos están en formato GeoPackage (.gpkg).
Cache is stored in: tools::R_user_dir("rsdot", which = "cache")/centros_poblados/
An sf (simple feature) object with POINT type geometry
containing population center information.
INEI. Censo de Población y Vivienda 2017. Instituto Nacional de Estadística e Informática. Visor SDOT: https://geosdot.servicios.gob.pe/visor/
get_capitales, get_departamentos,
read_sf
## Not run: # Ver departamentos disponibles get_centros_poblados() # Cargar centros poblados de un departamento cp_tacna <- get_centros_poblados(departamento = "TACNA") ## End(Not run)## Not run: # Ver departamentos disponibles get_centros_poblados() # Cargar centros poblados de un departamento cp_tacna <- get_centros_poblados(departamento = "TACNA") ## End(Not run)
Downloads and loads information on population centers with their average annual intercensal population growth rate (2007-2017) from the DEMARCA OSF repository. Data includes POINT type geometry and allows identifying changes in population volume for each population center. Allows stepwise filtering by department, province, and district.
get_centros_poblados_crecimiento( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_centros_poblados_crecimiento( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter within the specified province(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in cache: tools::R_user_dir("rsdot", which = "cache")/densidad_crecimiento_pob_ccpp/.
An sf (simple feature) object with POINT type geometry containing
information on population centers and their growth rate.
INEI. National Population and Housing Censuses 2007 and 2017. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_centros_poblados, get_densidad_poblacional,
get_departamentos, read_sf
## Not run: # See available departments get_centros_poblados_crecimiento() # Load population growth rate for Cusco ccpp_cusco <- get_centros_poblados_crecimiento(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_centros_poblados_crecimiento() # Load population growth rate for Cusco ccpp_cusco <- get_centros_poblados_crecimiento(departamento = "CUSCO") ## End(Not run)
Downloads and loads information on mobile coverage by population center from the DEMARCA OSF repository. Data includes binary information (YES/NO) on the existence of 2G, 3G, 4G, and 5G coverage for each population center according to the SDOT Viewer.
get_cobertura_movil_c( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE ) get_cobertura_movil( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_cobertura_movil_c( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE ) get_cobertura_movil( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download. Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO", "CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN", "LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA", "PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI". |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter within the specified province(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
La función descarga datos desde OSF (Open Science Framework) y los almacena
en caché: tools::R_user_dir("rsdot", which = "cache")/cobertura_movil/.
Los datos están en formato GeoPackage (.gpkg).
An sf (simple feature) object with POINT geometry containing
mobile coverage information.
Ministerio de Transportes y Comunicaciones (MTC) / OSIPTEL. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_departamentos, get_provincias,
get_distritos, get_centros_poblados,
read_sf
## Not run: # Ver departamentos disponibles get_cobertura_movil() # Cargar cobertura móvil de Cusco cob_cusco <- get_cobertura_movil(departamento = "CUSCO") ## End(Not run)## Not run: # Ver departamentos disponibles get_cobertura_movil() # Cargar cobertura móvil de Cusco cob_cusco <- get_cobertura_movil(departamento = "CUSCO") ## End(Not run)
Downloads and loads spatial density models of commercial, market, financial, real estate, and housing activities developed for territorial modeling by SDOT-PCM. Data includes polygon/grid geometry with standardized density indicators.
get_densidad_actividades( tipo = NULL, departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE, ... ) get_densidad_comercio(...) get_densidad_mercados(...) get_densidad_financiero(...) get_densidad_inmobiliario(...) get_densidad_viviendas(...)get_densidad_actividades( tipo = NULL, departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE, ... ) get_densidad_comercio(...) get_densidad_mercados(...) get_densidad_financiero(...) get_densidad_inmobiliario(...) get_densidad_viviendas(...)
tipo |
Character. Activity density model to retrieve. Valid options:
Case-insensitive. If |
departamento |
Character vector. Name(s) of the department(s) to filter. Optional. |
provincia |
Character vector. Name(s) of the province(s) to filter. Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter. Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
... |
Additional arguments passed to internal filtering functions. |
Cache is stored under tools::R_user_dir("rsdot", which = "cache")/densidad_actividades/.
An sf (simple feature) object containing the requested density model.
get_densidad_poblacional, get_distritos
## Not run: # List available types get_densidad_actividades() # Load commerce density for Cusco dens_com <- get_densidad_comercio(departamento = "CUSCO") # Load financial services density dens_fin <- get_densidad_financiero(departamento = "LIMA") ## End(Not run)## Not run: # List available types get_densidad_actividades() # Load commerce density for Cusco dens_com <- get_densidad_comercio(departamento = "CUSCO") # Load financial services density dens_fin <- get_densidad_financiero(departamento = "LIMA") ## End(Not run)
Downloads and loads information on intercensal population density and growth (2007-2017) of Peru, prepared by INEI and distributed through the SDOT Viewer. Data includes MULTIPOLYGON geometry at the block or census area level with indicators of density, population change, and growth categories. Allows stepwise filtering by department, province, and district.
get_densidad_poblacional( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_densidad_poblacional( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter within the specified province(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in cache: tools::R_user_dir("rsdot", which = "cache")/densidad_poblacional/.
An sf (simple feature) object with MULTIPOLYGON geometry containing
population density and growth attributes.
INEI. National Population and Housing Censuses 2007 and 2017. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_centros_poblados_crecimiento, get_departamentos,
read_sf
## Not run: # See available departments get_densidad_poblacional() # Load population density for Cusco dens_cusco <- get_densidad_poblacional(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_densidad_poblacional() # Load population density for Cusco dens_cusco <- get_densidad_poblacional(departamento = "CUSCO") ## End(Not run)
Downloads and loads the official departmental limits from INEI (2023) from the DEMARCA OSF repository. Implements persistent caching to optimize repeated downloads and keeps the console clean during execution.
get_departamentos( departamento = NULL, show_progress = TRUE, force_update = FALSE )get_departamentos( departamento = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to filter.
Can be a single department (e.g., "CUSCO") or multiple departments
(e.g., c("CUSCO", "PUNO")). Case-insensitive.
If |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data directly from OSF (Open Science Framework)
and stores it in the user's cache directory (tools::R_user_dir("rsdot", "cache")).
The data corresponds to the official INEI 2023 census limits.
Data source: DEMARCA Repository on OSF (https://osf.io/grhe3/)
An sf (simple feature) object with the geometry of the requested
departments, including their geographic and administrative attributes.
INEI (2023). Departmental Census Limits of Peru. SDOT DEMARCA PERU VISOR Repository: https://osf.io/qy4j6/overview
## Not run: # Load all departments of Peru peru <- get_departamentos() # Load a specific department (case-insensitive) cusco <- get_departamentos(departamento = "Cusco") # Load multiple departments (southern region) sur <- get_departamentos( departamento = c("PUNO", "TACNA", "MOQUEGUA", "AREQUIPA") ) # Force data update peru_updated <- get_departamentos(force_update = TRUE) # Silent execution lima <- get_departamentos(departamento = "LIMA", show_progress = FALSE) # Visualization with ggplot2 library(ggplot2) ggplot(peru) + geom_sf(fill = "#ff9999", color = "#e60000", linewidth = 1) + labs( title = "Departmental Census Limits of Peru", subtitle = "INEI 2023 Census Limits", caption = "Source: INEI | Visor - SDOT" ) + theme_minimal() ## End(Not run)## Not run: # Load all departments of Peru peru <- get_departamentos() # Load a specific department (case-insensitive) cusco <- get_departamentos(departamento = "Cusco") # Load multiple departments (southern region) sur <- get_departamentos( departamento = c("PUNO", "TACNA", "MOQUEGUA", "AREQUIPA") ) # Force data update peru_updated <- get_departamentos(force_update = TRUE) # Silent execution lima <- get_departamentos(departamento = "LIMA", show_progress = FALSE) # Visualization with ggplot2 library(ggplot2) ggplot(peru) + geom_sf(fill = "#ff9999", color = "#e60000", linewidth = 1) + labs( title = "Departmental Census Limits of Peru", subtitle = "INEI 2023 Census Limits", caption = "Source: INEI | Visor - SDOT" ) + theme_minimal() ## End(Not run)
Downloads and loads the official district limits from INEI (2023 or 2025 update) from the DEMARCA OSF repository. Implements persistent caching to optimize repeated downloads and keeps the console clean during execution.
get_distritos( distrito = NULL, provincia = NULL, departamento = NULL, ano = 2023, show_progress = TRUE, force_update = FALSE, ... ) get_distritos_2025(...)get_distritos( distrito = NULL, provincia = NULL, departamento = NULL, ano = 2023, show_progress = TRUE, force_update = FALSE, ... ) get_distritos_2025(...)
distrito |
Character vector. Name(s) of the district(s) to filter.
Can be a single district (e.g., "WANCHAQ") or multiple districts
(e.g., c("CUSCO", "WANCHAQ", "SANTIAGO")). Case-insensitive.
If |
provincia |
Character vector. Name of the province to filter all its districts (e.g., "CUSCO"). If specified, it returns all the districts of the indicated province. Case-insensitive. |
departamento |
Character vector. Name of the department to filter all its districts (e.g., "CUSCO"). If specified, it returns all the districts of the indicated department. Case-insensitive. |
ano |
Numeric or character. Year of the district limits: |
show_progress |
Logical. If |
force_update |
Logical. If |
... |
Additional arguments passed to internal functions. |
The function downloads data directly from OSF (Open Science Framework)
and stores it in the user's cache directory (tools::R_user_dir("rsdot", "cache")).
The data corresponds to the official INEI census limits (2023 or 2025 update).
The function automatically handles special character encoding (accents, ñ) to ensure compatibility across different operating systems.
Filters can be combined hierarchically:
Department only: returns all districts in the department
Department + province: returns all districts in that province
Department + province + district: returns specific districts
District only: returns that district from anywhere in Peru
Data source: DEMARCA Repository on OSF (https://osf.io/j9ax8/)
An sf (simple feature) object with the geometry of the requested
districts, including their geographic and administrative attributes.
INEI (2023/2025). District Census Limits of Peru. SDOT DEMARCA PERU VISOR Repository: https://osf.io/qy4j6/overview
## Not run: # Load all districts of Peru (2023) distritos_peru <- get_distritos() # Load 2025 districts update distritos_2025 <- get_distritos_2025() # Load a specific district wanchaq <- get_distritos(distrito = "Wanchaq") # Load all districts of a province distritos_cusco <- get_distritos(provincia = "Cusco") ## End(Not run)## Not run: # Load all districts of Peru (2023) distritos_peru <- get_distritos() # Load 2025 districts update distritos_2025 <- get_distritos_2025() # Load a specific district wanchaq <- get_distritos(distrito = "Wanchaq") # Load all districts of a province distritos_cusco <- get_distritos(provincia = "Cusco") ## End(Not run)
Downloads and loads spatial flow lines of inter-district commuting and mobility patterns for students and workers in Peru, modeled by SDOT-PCM. Available across multiple flow volume brackets (e.g. 100-1000, 1000-3500, etc.).
get_flujos_movilidad( tipo = NULL, volumen = NULL, departamento = NULL, show_progress = TRUE, force_update = FALSE, ... ) get_flujos_estudiantes(volumen = "100_1000", ...) get_flujos_trabajadores(volumen = "100_1500", ...)get_flujos_movilidad( tipo = NULL, volumen = NULL, departamento = NULL, show_progress = TRUE, force_update = FALSE, ... ) get_flujos_estudiantes(volumen = "100_1000", ...) get_flujos_trabajadores(volumen = "100_1500", ...)
tipo |
Character. Type of mobility flow:
Case-insensitive. If |
volumen |
Character or numeric. Volume interval bracket:
|
departamento |
Character vector. Name(s) of department(s) to filter. Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
... |
Additional arguments passed to internal filtering functions. |
Cache is stored under tools::R_user_dir("rsdot", which = "cache")/flujos_movilidad/.
An sf (simple feature) object with LINESTRING geometries representing mobility vectors.
get_red_vial_nacional, get_tiempos_desplazamiento
## Not run: # List available options get_flujos_movilidad() # Load student flows between 100 and 1,000 trips flujos_est <- get_flujos_estudiantes(volumen = "100_1000") # Load worker flows flujos_trb <- get_flujos_trabajadores(volumen = "100_1500") ## End(Not run)## Not run: # List available options get_flujos_movilidad() # Load student flows between 100 and 1,000 trips flujos_est <- get_flujos_estudiantes(volumen = "100_1000") # Load worker flows flujos_trb <- get_flujos_trabajadores(volumen = "100_1500") ## End(Not run)
Downloads and loads information on Health Service Provider Institutions (IPRESS) of Peru, prepared by the National Health Superintendence (SUSALUD). Data includes POINT type geometry and information on health establishments, supporting medical services, categorization, operating hours, and health networks. Updated to 2024. Allows stepwise filtering by department, province, and district.
get_ipress( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_ipress( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter within the specified province(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in cache: tools::R_user_dir("rsdot", which = "cache")/ipress/.
An sf (simple feature) object with POINT geometry containing
IPRESS information.
National Health Superintendence (SUSALUD). National Registry of Health Service Provider Institutions (RENIPRESS) 2024. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_departamentos, get_provincias,
get_distritos, get_centros_poblados,
read_sf
## Not run: # See available departments get_ipress() # Load IPRESS for Cusco ipress_cusco <- get_ipress(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_ipress() # Load IPRESS for Cusco ipress_cusco <- get_ipress(departamento = "CUSCO") ## End(Not run)
Downloads and loads information on educational venues in Peru, prepared by the Ministry of Education (MINEDU). Data includes POINT type geometry and detailed physical and operational attributes for each venue. Updated to 2024. Allows stepwise filtering by department, province, and district.
get_locales_educativos( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_locales_educativos( departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter within the specified province(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in cache: tools::R_user_dir("rsdot", which = "cache")/locales_educativos/.
An sf (simple feature) object with POINT geometry containing
educational venues information.
MINEDU - ESCALE. Padrón de Locales Educativos 2024. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_servicios_educativos, get_departamentos,
read_sf
## Not run: # See available departments get_locales_educativos() # Load educational venues for Cusco locales_cusco <- get_locales_educativos(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_locales_educativos() # Load educational venues for Cusco locales_cusco <- get_locales_educativos(departamento = "CUSCO") ## End(Not run)
Downloads and loads spatial data of natural hazards (floods, mass movements, etc.) prepared by SDOT-PCM. Data includes polygons, lines, or points representing areas of exposure, critical points, and tramos.
get_peligros( tipo = NULL, departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE, ... ) get_puntos_criticos(...) get_tramos_criticos(...) get_zonas_criticas(...) get_areas_inundacion(...) get_areas_movimientos_masa(...) get_inventario_inundaciones(...)get_peligros( tipo = NULL, departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE, ... ) get_puntos_criticos(...) get_tramos_criticos(...) get_zonas_criticas(...) get_areas_inundacion(...) get_areas_movimientos_masa(...) get_inventario_inundaciones(...)
tipo |
Character. The type of hazard layer to retrieve. Valid options:
Case-insensitive. If |
departamento |
Character vector. Name(s) of the department(s) to download.
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter. Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter. Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
... |
Additional arguments passed to internal functions or wrapper methods. |
Cache is stored under subdirectories of tools::R_user_dir("rsdot", which = "cache")/.
An sf (simple feature) object representing the requested hazard layer.
## Not run: # List available types get_peligros() # Load critical flood points for Cusco pc_cusco <- get_peligros(tipo = "puntos_criticos", departamento = "CUSCO") ## End(Not run)## Not run: # List available types get_peligros() # Load critical flood points for Cusco pc_cusco <- get_peligros(tipo = "puntos_criticos", departamento = "CUSCO") ## End(Not run)
Downloads and loads the official provincial limits from INEI (2023) from the DEMARCA OSF repository. Implements persistent caching to optimize repeated downloads and keeps the console clean during execution.
get_provincias( provincia = NULL, departamento = NULL, show_progress = TRUE, force_update = FALSE )get_provincias( provincia = NULL, departamento = NULL, show_progress = TRUE, force_update = FALSE )
provincia |
Character vector. Name(s) of the province(s) to filter.
Can be a single province (e.g., "URUBAMBA") or multiple provinces
(e.g., c("CAÑETE", "CHINCHA")). Case-insensitive.
If |
departamento |
Character vector. Name of the department to filter all its provinces (e.g., "CUSCO"). If specified, it returns all the provinces of the indicated department. Case-insensitive. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data directly from OSF (Open Science Framework)
and stores it in the user's cache directory (tools::R_user_dir("rsdot", "cache")).
The data corresponds to the official INEI 2023 census limits.
The function automatically corrects character encoding issues (especially Ñ and accents) in the original data.
Data source: DEMARCA Repository on OSF (https://osf.io/t36aj/)
An sf (simple feature) object with the geometry of the requested
provinces, including their geographic and administrative attributes.
INEI (2023). Provincial Census Limits of Peru. DEMARCA Repository: https://osf.io/t36aj/
get_departamentos, read_sf,
st_geometry
## Not run: # Load all provinces of Peru provincias_peru <- get_provincias() # Load a specific province urubamba <- get_provincias(provincia = "Urubamba") # Load all provinces of a department provincias_cusco <- get_provincias(departamento = "Cusco") # Load multiple specific provinces sur_chico <- get_provincias( provincia = c("CAÑETE", "CHINCHA", "PISCO") ) # Combine filters: specific provinces of a department costa_lima <- get_provincias( provincia = c("CAÑETE", "YAUYOS"), departamento = "LIMA" ) # Force data update provincias_updated <- get_provincias(force_update = TRUE) # Silent execution pasco <- get_provincias(departamento = "PASCO", show_progress = FALSE) # Visualization with ggplot2 library(ggplot2) # Map of all provinces in Cusco ggplot(provincias_cusco) + geom_sf(aes(fill = nombprov), color = "white", linewidth = 0.3) + labs( title = "Provinces of the Department of Cusco", subtitle = "INEI 2023 Census Limits", fill = "Province", caption = "Source: INEI | Visor - SDOT" ) + scale_fill_viridis_d(option = "plasma") + theme_minimal() + theme(legend.position = "right") ## End(Not run)## Not run: # Load all provinces of Peru provincias_peru <- get_provincias() # Load a specific province urubamba <- get_provincias(provincia = "Urubamba") # Load all provinces of a department provincias_cusco <- get_provincias(departamento = "Cusco") # Load multiple specific provinces sur_chico <- get_provincias( provincia = c("CAÑETE", "CHINCHA", "PISCO") ) # Combine filters: specific provinces of a department costa_lima <- get_provincias( provincia = c("CAÑETE", "YAUYOS"), departamento = "LIMA" ) # Force data update provincias_updated <- get_provincias(force_update = TRUE) # Silent execution pasco <- get_provincias(departamento = "PASCO", show_progress = FALSE) # Visualization with ggplot2 library(ggplot2) # Map of all provinces in Cusco ggplot(provincias_cusco) + geom_sf(aes(fill = nombprov), color = "white", linewidth = 0.3) + labs( title = "Provinces of the Department of Cusco", subtitle = "INEI 2023 Census Limits", fill = "Province", caption = "Source: INEI | Visor - SDOT" ) + scale_fill_viridis_d(option = "plasma") + theme_minimal() + theme(legend.position = "right") ## End(Not run)
Downloads and loads information on the Departmental Road Network updated by PROVIAS NACIONAL as of July 2022, according to the Route Classifier approved by Supreme Decree 011-2016-MTC and its amendments. Data includes MULTILINESTRING type geometry and information on trajectories, status, and surface of departmental roads. Allows stepwise filtering by department and province.
get_red_vial_departamental( departamento = NULL, provincia = NULL, show_progress = TRUE, force_update = FALSE )get_red_vial_departamental( departamento = NULL, provincia = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in cache: tools::R_user_dir("rsdot", which = "cache")/red_vial_departamental/.
An sf (simple feature) object with MULTILINESTRING geometry
containing departmental road network information.
PROVIAS NACIONAL - MTC. Base Cartográfica de la Red Vial Departamental 2022. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_red_vial_nacional, get_departamentos,
read_sf
## Not run: # See available departments get_red_vial_departamental() # Load road network for Cusco vias_cusco <- get_red_vial_departamental(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_red_vial_departamental() # Load road network for Cusco vias_cusco <- get_red_vial_departamental(departamento = "CUSCO") ## End(Not run)
Downloads and loads information on the National Road Network (Red Vial Nacional - RVN) of Peru updated to 2022, prepared by PROVIAS NACIONAL and the Ministry of Transport and Communications (MTC). Data includes MULTILINESTRING geometry and detailed attributes for each road section.
get_red_vial_nacional( departamento = NULL, show_progress = TRUE, force_update = FALSE )get_red_vial_nacional( departamento = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in cache: tools::R_user_dir("rsdot", which = "cache")/red_vial_nacional/.
An sf (simple feature) object with MULTILINESTRING geometry
containing national road network information.
PROVIAS NACIONAL - MTC. Base Cartográfica de la Red Vial Nacional 2022. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_red_vial_departamental, get_departamentos,
read_sf
## Not run: # See available departments get_red_vial_nacional() # Load road network for Cusco vias_cusco <- get_red_vial_nacional(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_red_vial_nacional() # Load road network for Cusco vias_cusco <- get_red_vial_nacional(departamento = "CUSCO") ## End(Not run)
Downloads and loads information on the Local Road Network updated by PROVIAS DESCENTRALIZADO as of July 2022, according to the Route Classifier approved by Supreme Decree 011-2016-MTC and its amendments. Data includes MULTILINESTRING type geometry and information on trajectories, status, and surface of local or rural roads. Allows stepwise filtering by department and province.
get_red_vial_vecinal( departamento = NULL, provincia = NULL, show_progress = TRUE, force_update = FALSE )get_red_vial_vecinal( departamento = NULL, provincia = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in cache: tools::R_user_dir("rsdot", which = "cache")/red_vial_vecinal/.
An sf (simple feature) object with MULTILINESTRING geometry
containing local road network information.
PROVIAS DESCENTRALIZADO - MTC. Base Cartográfica de la Red Vial Vecinal 2022. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_red_vial_nacional, get_red_vial_departamental,
get_departamentos, read_sf
## Not run: # See available departments get_red_vial_vecinal() # Load local roads of Cusco vias_cusco <- get_red_vial_vecinal(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_red_vial_vecinal() # Load local roads of Cusco vias_cusco <- get_red_vial_vecinal(departamento = "CUSCO") ## End(Not run)
Downloads and loads spatial data of disaster risk assessments and non-mitigable risk zones prepared by SDOT-PCM and CENEPRED.
get_riesgos( tipo = NULL, departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE, ... ) get_evaluacion_riesgos(...) get_zonas_riesgos_no_mitigable(...)get_riesgos( tipo = NULL, departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE, ... ) get_evaluacion_riesgos(...) get_zonas_riesgos_no_mitigable(...)
tipo |
Character. The type of risk layer to retrieve. Valid options:
Case-insensitive. If |
departamento |
Character vector. Name(s) of the department(s) to download.
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter. Optional. |
distrito |
Character vector. Name(s) of the district(s) to filter. Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
... |
Additional arguments passed to internal functions or wrapper methods. |
Cache is stored under subdirectories of tools::R_user_dir("rsdot", which = "cache")/.
An sf (simple feature) object representing the requested risk layer.
## Not run: # List available types get_riesgos() # Load non-mitigable risk zones for Cusco r_cusco <- get_riesgos(tipo = "no_mitigable", departamento = "CUSCO") ## End(Not run)## Not run: # List available types get_riesgos() # Load non-mitigable risk zones for Cusco r_cusco <- get_riesgos(tipo = "no_mitigable", departamento = "CUSCO") ## End(Not run)
Downloads and loads information on educational services in Peru, prepared by the Ministry of Education (MINEDU). Data includes POINT type geometry and detailed programmatic, level, and enrollment attributes for each service. Updated to 2024. Allows stepwise filtering by department and province.
get_servicios_educativos( departamento = NULL, provincia = NULL, show_progress = TRUE, force_update = FALSE )get_servicios_educativos( departamento = NULL, provincia = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in cache: tools::R_user_dir("rsdot", which = "cache")/servicios_educativos/.
An sf (simple feature) object with POINT geometry containing
educational services information.
MINEDU - ESCALE. Padrón de Instituciones Educativas 2024. DEMARCA OSF Repository: https://osf.io/qy4j6/
get_locales_educativos, get_departamentos,
read_sf
## Not run: # See available departments get_servicios_educativos() # Load educational services for Cusco serv_cusco <- get_servicios_educativos(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_servicios_educativos() # Load educational services for Cusco serv_cusco <- get_servicios_educativos(departamento = "CUSCO") ## End(Not run)
Downloads and loads information on travel times to the nearest departmental capital from the DEMARCA OSF repository. The data represents accessibility layers from the SDOT-PCM Spatial Data Viewer. Supports spatial clipping via an area of interest, or filtering by department, province, and district.
get_tiempos_desplazamiento( departamento = NULL, provincia = NULL, distrito = NULL, area_interes = NULL, show_progress = TRUE, force_update = FALSE )get_tiempos_desplazamiento( departamento = NULL, provincia = NULL, distrito = NULL, area_interes = NULL, show_progress = TRUE, force_update = FALSE )
departamento |
Character vector. Name(s) of the department(s) to download.
Valid options: "AMAZONAS", "ANCASH", "APURIMAC", "AREQUIPA", "AYACUCHO",
"CAJAMARCA", "CALLAO", "CUSCO", "HUANCAVELICA", "HUANUCO", "ICA", "JUNIN",
"LA LIBERTAD", "LAMBAYEQUE", "LIMA", "LORETO", "MADRE DE DIOS", "MOQUEGUA",
"PASCO", "PIURA", "PUNO", "SAN MARTIN", "TACNA", "TUMBES", "UCAYALI".
Case-insensitive. If |
provincia |
Character vector. Name(s) of the province(s) to filter. Optional. Since the raw dataset lacks administrative columns, filtering is performed spatially using boundary geometries. |
distrito |
Character vector. Name(s) of the district(s) to filter. Optional. Performed spatially using boundary geometries. |
area_interes |
An |
show_progress |
Logical. If |
force_update |
Logical. If |
The function downloads data from OSF (Open Science Framework) and stores it
in persistent cache: tools::R_user_dir("rsdot", which = "cache")/tiempo_desplazamiento/.
An sf (simple feature) object with MULTIPOLYGON geometry containing
accessibility attributes:
dn: Numeric classification of time values.
cat_tiempo: Time interval category (e.g. "<= 30 min", etc.).
fid: Feature identifier.
capa: Source layer name.
get_departamentos, get_provincias, get_distritos
## Not run: # See available departments get_tiempos_desplazamiento() # Load times for a specific department tiempos_cusco <- get_tiempos_desplazamiento(departamento = "CUSCO") ## End(Not run)## Not run: # See available departments get_tiempos_desplazamiento() # Load times for a specific department tiempos_cusco <- get_tiempos_desplazamiento(departamento = "CUSCO") ## End(Not run)
Downloads and loads the socioeconomic model of Gross Added Value (VAB - Valor Agregado Bruto) estimated at a 150-meter buffer around population centers (CCPP) in Peru, prepared by SDOT-PCM. Available at national coverage or focused metropolitan domains (Lima, Callao).
get_vab_ccpp( cobertura = "total", departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )get_vab_ccpp( cobertura = "total", departamento = NULL, provincia = NULL, distrito = NULL, show_progress = TRUE, force_update = FALSE )
cobertura |
Character. Geographic scope to retrieve:
Default is |
departamento |
Character vector. Name(s) of department(s) to filter. Optional. |
provincia |
Character vector. Name(s) of province(s) to filter. Optional. |
distrito |
Character vector. Name(s) of district(s) to filter. Optional. |
show_progress |
Logical. If |
force_update |
Logical. If |
Cache is stored under tools::R_user_dir("rsdot", which = "cache")/vab_ccpp/.
An sf (simple feature) object containing population centers with estimated VAB attributes.
get_centros_poblados, get_densidad_actividades
## Not run: # Load national VAB model vab_nac <- get_vab_ccpp() # Load VAB model for Lima vab_lima <- get_vab_ccpp(cobertura = "lima") ## End(Not run)## Not run: # Load national VAB model vab_nac <- get_vab_ccpp() # Load VAB model for Lima vab_lima <- get_vab_ccpp(cobertura = "lima") ## End(Not run)
Retrieves the complete catalog of spatial layers supported by the rsdot
package, detailing the layer key, thematic domain, source layer in GeoServer,
geographic partitioning level, and the recommended R access function.
list_available_layers(domain = NULL, show_details = FALSE)list_available_layers(domain = NULL, show_details = FALSE)
domain |
Character. Optional filter by thematic domain:
|
show_details |
Logical. If |
A data.frame containing the catalog of layers.
## Not run: # List all supported layers list_available_layers() # Filter only transportation layers list_available_layers(domain = "transport") ## End(Not run)## Not run: # List all supported layers list_available_layers() # Filter only transportation layers list_available_layers(domain = "transport") ## End(Not run)
Inspects the local persistent cache directory used by rsdot, analyzes
which spatial layers have been downloaded, and compares their status and
file modification dates to assist users in knowing if local data is current
or if newer versions are available.
rsdot_check_updates(show_all = FALSE)rsdot_check_updates(show_all = FALSE)
show_all |
Logical. If |
A data.frame with the update and cache status of each layer (returned invisibly).
## Not run: # Check status of downloaded datasets in local cache rsdot_check_updates() # Check all layers in the catalog rsdot_check_updates(show_all = TRUE) ## End(Not run)## Not run: # Check status of downloaded datasets in local cache rsdot_check_updates() # Check all layers in the catalog rsdot_check_updates(show_all = TRUE) ## End(Not run)