Package 'rsdot'

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

Help Index


Clear package cache

Description

Deletes all downloaded files in the rsdot cache directory.

Usage

clear_rsdot_cache()

Value

Invisible TRUE if deleted successfully.

Examples

## Not run: 
clear_rsdot_cache()

## End(Not run)

Get Airfields of Peru

Description

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.

Usage

get_aerodromos(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

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.

Value

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.

References

Ministry of Transport and Communications (MTC). Airfields of Peru 2022. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_departamentos, get_provincias, get_distritos, read_sf

Examples

## 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)

Get District Capitals of Peru

Description

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.

Usage

get_capitales(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

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.

Value

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.

References

INEI. 2017 Population and Housing Census. National Institute of Statistics and Informatics.

SDOT Viewer: https://geosdot.servicios.gob.pe/visor/

See Also

get_centros_poblados, get_departamentos, read_sf

Examples

## 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)

Get Rural Cadastre Spatial Data of Peru

Description

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.

Usage

get_catastro_rural(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 TRUE (default), shows informative messages.

force_update

Logical. If TRUE, forces a new download of files. Default FALSE.

Details

Cache is stored under tools::R_user_dir("rsdot", which = "cache")/catastro_rural/.

Value

An sf (simple feature) object containing cadastral parcels.

References

MIDAGRI. Sistema Catastral Rural de Predios Individuales y Comunales. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_distritos, get_departamentos

Examples

## Not run: 
# Load rural cadastre for a department
catastro_cusco <- get_catastro_rural(departamento = "CUSCO")

## End(Not run)

Get Population Centers of Peru

Description

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.

Usage

get_centros_poblados(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

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/

Value

An sf (simple feature) object with POINT type geometry containing population center information.

References

INEI. Censo de Población y Vivienda 2017. Instituto Nacional de Estadística e Informática. Visor SDOT: https://geosdot.servicios.gob.pe/visor/

See Also

get_capitales, get_departamentos, read_sf

Examples

## Not run: 
# Ver departamentos disponibles
get_centros_poblados()

# Cargar centros poblados de un departamento
cp_tacna <- get_centros_poblados(departamento = "TACNA")

## End(Not run)

Get Population Centers with Population Growth Rate

Description

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.

Usage

get_centros_poblados_crecimiento(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

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/.

Value

An sf (simple feature) object with POINT type geometry containing information on population centers and their growth rate.

References

INEI. National Population and Housing Censuses 2007 and 2017. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_centros_poblados, get_densidad_poblacional, get_departamentos, read_sf

Examples

## 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)

Get Mobile Coverage by Population Center

Description

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.

Usage

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
)

Arguments

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

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).

Value

An sf (simple feature) object with POINT geometry containing mobile coverage information.

References

Ministerio de Transportes y Comunicaciones (MTC) / OSIPTEL. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_departamentos, get_provincias, get_distritos, get_centros_poblados, read_sf

Examples

## Not run: 
# Ver departamentos disponibles
get_cobertura_movil()

# Cargar cobertura móvil de Cusco
cob_cusco <- get_cobertura_movil(departamento = "CUSCO")

## End(Not run)

Get Economic Activity and Housing Density Models of Peru

Description

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.

Usage

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(...)

Arguments

tipo

Character. Activity density model to retrieve. Valid options:

  • "comercio": Density of retail and wholesale commerce.

  • "mercado" (or "mercados"): Density of municipal/neighborhood supply markets.

  • "financiero": Density of banking and financial services.

  • "inmobiliario": Density of real estate activity and developments.

  • "viviendas": Density of residential housing units.

Case-insensitive. If NULL, lists available options.

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 TRUE (default), shows informative messages.

force_update

Logical. If TRUE, forces a new download of files. Default FALSE.

...

Additional arguments passed to internal filtering functions.

Details

Cache is stored under tools::R_user_dir("rsdot", which = "cache")/densidad_actividades/.

Value

An sf (simple feature) object containing the requested density model.

See Also

get_densidad_poblacional, get_distritos

Examples

## 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)

Get Intercensal Population Density and Growth of Peru

Description

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.

Usage

get_densidad_poblacional(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

The function downloads data from OSF (Open Science Framework) and stores it in cache: tools::R_user_dir("rsdot", which = "cache")/densidad_poblacional/.

Value

An sf (simple feature) object with MULTIPOLYGON geometry containing population density and growth attributes.

References

INEI. National Population and Housing Censuses 2007 and 2017. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_centros_poblados_crecimiento, get_departamentos, read_sf

Examples

## Not run: 
# See available departments
get_densidad_poblacional()

# Load population density for Cusco
dens_cusco <- get_densidad_poblacional(departamento = "CUSCO")

## End(Not run)

Get Departmental Census Limits of Peru

Description

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.

Usage

get_departamentos(
  departamento = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL (default), returns all departments of Peru.

show_progress

Logical. If TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE to leverage cached data.

Details

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/)

Value

An sf (simple feature) object with the geometry of the requested departments, including their geographic and administrative attributes.

References

INEI (2023). Departmental Census Limits of Peru. SDOT DEMARCA PERU VISOR Repository: https://osf.io/qy4j6/overview

See Also

read_sf, st_geometry

Examples

## 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)

Get District Census Limits of Peru

Description

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.

Usage

get_distritos(
  distrito = NULL,
  provincia = NULL,
  departamento = NULL,
  ano = 2023,
  show_progress = TRUE,
  force_update = FALSE,
  ...
)

get_distritos_2025(...)

Arguments

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 NULL, no filtering is performed by district.

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: 2023 (default) or 2025 (updated boundary layer).

show_progress

Logical. If TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE to leverage cached data.

...

Additional arguments passed to internal functions.

Details

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/)

Value

An sf (simple feature) object with the geometry of the requested districts, including their geographic and administrative attributes.

References

INEI (2023/2025). District Census Limits of Peru. SDOT DEMARCA PERU VISOR Repository: https://osf.io/qy4j6/overview

See Also

read_sf, st_geometry

Examples

## 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)

Get Territorial Mobility and Commuting Flows of Peru

Description

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.).

Usage

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", ...)

Arguments

tipo

Character. Type of mobility flow:

  • "estudiantes" (or "est"): Student commuting flows.

  • "trabajadores" (or "trb"): Worker commuting flows.

Case-insensitive. If NULL, lists available types and volume intervals.

volumen

Character or numeric. Volume interval bracket:

  • For students: "100_1000" (default), "1000_3500", "3500_7000", "7000_13000", "13000".

  • For workers: "100_1500" (default), "1500_5000", "5000_10000", "10000_25000", "25000".

departamento

Character vector. Name(s) of department(s) to filter. Optional.

show_progress

Logical. If TRUE (default), shows informative messages.

force_update

Logical. If TRUE, forces a new download of files. Default FALSE.

...

Additional arguments passed to internal filtering functions.

Details

Cache is stored under tools::R_user_dir("rsdot", which = "cache")/flujos_movilidad/.

Value

An sf (simple feature) object with LINESTRING geometries representing mobility vectors.

See Also

get_red_vial_nacional, get_tiempos_desplazamiento

Examples

## 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)

Get Health Service Provider Institutions (IPRESS) of Peru

Description

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.

Usage

get_ipress(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

The function downloads data from OSF (Open Science Framework) and stores it in cache: tools::R_user_dir("rsdot", which = "cache")/ipress/.

Value

An sf (simple feature) object with POINT geometry containing IPRESS information.

References

National Health Superintendence (SUSALUD). National Registry of Health Service Provider Institutions (RENIPRESS) 2024. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_departamentos, get_provincias, get_distritos, get_centros_poblados, read_sf

Examples

## Not run: 
# See available departments
get_ipress()

# Load IPRESS for Cusco
ipress_cusco <- get_ipress(departamento = "CUSCO")

## End(Not run)

Get Educational Venues of Peru

Description

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.

Usage

get_locales_educativos(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

The function downloads data from OSF (Open Science Framework) and stores it in cache: tools::R_user_dir("rsdot", which = "cache")/locales_educativos/.

Value

An sf (simple feature) object with POINT geometry containing educational venues information.

References

MINEDU - ESCALE. Padrón de Locales Educativos 2024. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_servicios_educativos, get_departamentos, read_sf

Examples

## Not run: 
# See available departments
get_locales_educativos()

# Load educational venues for Cusco
locales_cusco <- get_locales_educativos(departamento = "CUSCO")

## End(Not run)

Get Natural Hazards Spatial Data of Peru

Description

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.

Usage

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(...)

Arguments

tipo

Character. The type of hazard layer to retrieve. Valid options:

  • "areas_exposicion_inundacion" (or alias "exp_inundacion")

  • "areas_exposicion_movimientos_masa" (or alias "exp_mov_masa")

  • "inventario_inundaciones"

  • "puntos_criticos_inundaciones" (or alias "puntos_criticos")

  • "tramos_criticos_inundaciones" (or alias "tramos_criticos")

  • "zonas_criticas_movimientos_masa" (or alias "zonas_criticas")

Case-insensitive. If NULL, lists all available types.

departamento

Character vector. Name(s) of the department(s) to download. Case-insensitive. If NULL, lists available departments for the selected type.

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 TRUE (default), shows informative messages.

force_update

Logical. If TRUE, forces a new download of files. Default FALSE.

...

Additional arguments passed to internal functions or wrapper methods.

Details

Cache is stored under subdirectories of tools::R_user_dir("rsdot", which = "cache")/.

Value

An sf (simple feature) object representing the requested hazard layer.

Examples

## 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)

Get Provincial Census Limits of Peru

Description

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.

Usage

get_provincias(
  provincia = NULL,
  departamento = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, no filtering is performed by province.

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 TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE to leverage cached data.

Details

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/)

Value

An sf (simple feature) object with the geometry of the requested provinces, including their geographic and administrative attributes.

References

INEI (2023). Provincial Census Limits of Peru. DEMARCA Repository: https://osf.io/t36aj/

See Also

get_departamentos, read_sf, st_geometry

Examples

## 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)

Get Departmental Road Network of Peru

Description

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.

Usage

get_red_vial_departamental(
  departamento = NULL,
  provincia = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

provincia

Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional.

show_progress

Logical. If TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

The function downloads data from OSF (Open Science Framework) and stores it in cache: tools::R_user_dir("rsdot", which = "cache")/red_vial_departamental/.

Value

An sf (simple feature) object with MULTILINESTRING geometry containing departmental road network information.

References

PROVIAS NACIONAL - MTC. Base Cartográfica de la Red Vial Departamental 2022. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_red_vial_nacional, get_departamentos, read_sf

Examples

## 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)

Get National Road Network of Peru

Description

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.

Usage

get_red_vial_nacional(
  departamento = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

show_progress

Logical. If TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

The function downloads data from OSF (Open Science Framework) and stores it in cache: tools::R_user_dir("rsdot", which = "cache")/red_vial_nacional/.

Value

An sf (simple feature) object with MULTILINESTRING geometry containing national road network information.

References

PROVIAS NACIONAL - MTC. Base Cartográfica de la Red Vial Nacional 2022. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_red_vial_departamental, get_departamentos, read_sf

Examples

## 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)

Get Local Road Network of Peru

Description

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.

Usage

get_red_vial_vecinal(
  departamento = NULL,
  provincia = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

provincia

Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional.

show_progress

Logical. If TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

The function downloads data from OSF (Open Science Framework) and stores it in cache: tools::R_user_dir("rsdot", which = "cache")/red_vial_vecinal/.

Value

An sf (simple feature) object with MULTILINESTRING geometry containing local road network information.

References

PROVIAS DESCENTRALIZADO - MTC. Base Cartográfica de la Red Vial Vecinal 2022. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_red_vial_nacional, get_red_vial_departamental, get_departamentos, read_sf

Examples

## 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)

Get Disaster Risk Spatial Data of Peru

Description

Downloads and loads spatial data of disaster risk assessments and non-mitigable risk zones prepared by SDOT-PCM and CENEPRED.

Usage

get_riesgos(
  tipo = NULL,
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE,
  ...
)

get_evaluacion_riesgos(...)

get_zonas_riesgos_no_mitigable(...)

Arguments

tipo

Character. The type of risk layer to retrieve. Valid options:

  • "evaluacion_riesgos" (or alias "evaluacion")

  • "zonas_riesgos_no_mitigable" (or alias "no_mitigable")

Case-insensitive. If NULL, lists all available types.

departamento

Character vector. Name(s) of the department(s) to download. Case-insensitive. If NULL, lists available departments for the selected type.

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 TRUE (default), shows informative messages.

force_update

Logical. If TRUE, forces a new download of files. Default FALSE.

...

Additional arguments passed to internal functions or wrapper methods.

Details

Cache is stored under subdirectories of tools::R_user_dir("rsdot", which = "cache")/.

Value

An sf (simple feature) object representing the requested risk layer.

Examples

## 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)

Get Educational Services of Peru

Description

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.

Usage

get_servicios_educativos(
  departamento = NULL,
  provincia = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL, shows the list of available departments.

provincia

Character vector. Name(s) of the province(s) to filter within the specified department(s). Optional.

show_progress

Logical. If TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the file even if it exists in cache. Default FALSE.

Details

The function downloads data from OSF (Open Science Framework) and stores it in cache: tools::R_user_dir("rsdot", which = "cache")/servicios_educativos/.

Value

An sf (simple feature) object with POINT geometry containing educational services information.

References

MINEDU - ESCALE. Padrón de Instituciones Educativas 2024. DEMARCA OSF Repository: https://osf.io/qy4j6/

See Also

get_locales_educativos, get_departamentos, read_sf

Examples

## Not run: 
# See available departments
get_servicios_educativos()

# Load educational services for Cusco
serv_cusco <- get_servicios_educativos(departamento = "CUSCO")

## End(Not run)

Get Travel Times to the Nearest Capital

Description

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.

Usage

get_tiempos_desplazamiento(
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  area_interes = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

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 NULL and area_interes is also NULL, shows the list of available departments.

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 sf or sfc object. Bounding boxes are used to dynamically identify and download the corresponding departments, and the resulting layer is cropped to the exact geometry of the area of interest.

show_progress

Logical. If TRUE (default), shows informative messages about download progress. If FALSE, executes silently.

force_update

Logical. If TRUE, forces a new download of the files even if they exist in cache. Default FALSE.

Details

The function downloads data from OSF (Open Science Framework) and stores it in persistent cache: tools::R_user_dir("rsdot", which = "cache")/tiempo_desplazamiento/.

Value

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.

See Also

get_departamentos, get_provincias, get_distritos

Examples

## Not run: 
# See available departments
get_tiempos_desplazamiento()

# Load times for a specific department
tiempos_cusco <- get_tiempos_desplazamiento(departamento = "CUSCO")

## End(Not run)

Get Gross Added Value (VAB) of Population Centers

Description

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).

Usage

get_vab_ccpp(
  cobertura = "total",
  departamento = NULL,
  provincia = NULL,
  distrito = NULL,
  show_progress = TRUE,
  force_update = FALSE
)

Arguments

cobertura

Character. Geographic scope to retrieve:

  • "total" (or "nacional"): Complete national model.

  • "lima": Metropolitan Lima model.

  • "callao": Callao region model.

Default is "total". Case-insensitive.

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 TRUE (default), shows informative messages.

force_update

Logical. If TRUE, forces a new download of files. Default FALSE.

Details

Cache is stored under tools::R_user_dir("rsdot", which = "cache")/vab_ccpp/.

Value

An sf (simple feature) object containing population centers with estimated VAB attributes.

See Also

get_centros_poblados, get_densidad_actividades

Examples

## 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)

List Available Layers in GeoSDOT and rsdot

Description

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.

Usage

list_available_layers(domain = NULL, show_details = FALSE)

Arguments

domain

Character. Optional filter by thematic domain: "limits", "transport", "services", "demography", "telecom", "hazards", "mobility", "cadastre", or NULL (default, returns all).

show_details

Logical. If TRUE, returns additional technical metadata such as GeoServer layer names and partition columns. Default is FALSE.

Value

A data.frame containing the catalog of layers.

Examples

## Not run: 
# List all supported layers
list_available_layers()

# Filter only transportation layers
list_available_layers(domain = "transport")

## End(Not run)

Check for Updates in Local rsdot Cache

Description

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.

Usage

rsdot_check_updates(show_all = FALSE)

Arguments

show_all

Logical. If TRUE, displays all cataloged layers including those not yet downloaded. If FALSE (default), displays only layers currently present in the local cache.

Value

A data.frame with the update and cache status of each layer (returned invisibly).

Examples

## 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)