eppexist: Evaluation of proximity coverage by a program and estimate...

View source: R/eppexist.R

eppexistR Documentation

Evaluation of proximity coverage by a program and estimate new services to attend the uncover population.

Description

Assigns the elements from pob to the centers by n+m iterations, according to the capacity and distance/s of radium of each center. The output is a list that contains four data.frames: pop have the unassigned population, centers has the centers that still have capacity available, used_capacity have the center's occuped capacity and assigned has the population assigned to the centers. The assignation of points to centers is based in proximity and optimization criteria (maximum distance and center's capacity).

Usage

eppexist(
  pop,
  centers,
  n = 3,
  m = 0,
  d1 = 1000,
  d2 = d1 * 2,
  crs = sp::CRS("+init=epsg:32721"),
  route = FALSE
)

Arguments

pop

Population to attend (dataframe with three variables: x, y, and weight). Each element represents the position and identity of a population's member. x and y represents plain coordinates in the selected Coordinate Reference System.

centers

Existing centers of the program (dataframe with four variables: x, y, id, capacity). Each element represents the position, identity and capacity of a center. x and y represents plain coordinates in the selected Coordinate Reference System.

n

Total number of iterations with the distance "d1". Default n = 3

m

Number of iteration in which change the distance of radium. If m>n only the first distance is used. Default m = 0

d1

Radius in meters that each center covers in the firsts "n" iterations. Default d1 = 1000

d2

Radius in meters that each center covers, the last "m" iterations. Default = d1 * 2

crs

Coordinate Reference Systems (CRS). Default = CRS("+init=epsg:32721").

route

logical if FALSE the distance is calculated by Pythagorean formula, if TRUE the distance is calculated by "osrmRoute" function of "osrm" Package. Default = FALSE

Value

Return a LIST with:

pop_uncover

DataFrame of the population still out of coverage; with its "x", "y" and "weight".

pop_assigned

DataFrame with the population assigned and the corresponding center; with its "x", "y","weight", "id" of the center and the "iteration" of assign.

remaining_capacity

DataFrame of the centers and its unused capacity; with "x" and "y" of the center, the "id", and the unused "capacity".

used_capacity

List of DataFrames with the centers and the info of population covered in each iteration. Each DataFrames have the name of the iteration, and contains the "id", "x" and "y" of the center; and the remaining "capacity" and "used_cap" after the iteration.

References

Bivand, R., Keitt, T., Rowlingson, B., Pebesma, E., Sumner, M., Hijmans, R. y Rouault, E. (2015), Bindings for the Geospatial Data Abstraction Library. URL https://cran.r-project.org/web/packages/rgdal/rgdal.pdf Botto, G. y Detomasi, R. (2015), Bases metodológicas para la planificación espacial de servicios de educación inicial en Uruguay. Jornadas Argentinas de Geo-tecnologías: Trabajos completos. Universidad Nacional de Luján - Sociedad de Especialistas Latinoamericanos en Percepción Remota - Universidad Nacional de San Luis, pp. 121-128.http://dinem.mides.gub.uy/innovaportal/file/61794/1/tecnologias-de-la-informacion-para-nuevas-formas-de-gestion-del-territorio.-2015.pdf Detomasi, R., Botto, G. y Hahn, M. (2015) CAIF: Análisis de demanda. Documento de trabajo, Mayo 2015. Departamento de Geografía. Dirección Nacional de Evaluación y Monitoreo. Ministerio de Desarrollo Social. http://dinem.mides.gub.uy/innovaportal/file/61792/1/caif.-analisis-de-demanda.-2015.pdf Farmer, carson (2009) Voronoi polygons with R. URL http://carsonfarmer.com/2009/09/voronoi-polygons-with-r/ Leisch, F. y Dimitriadou, E. (2013), Flexible Cluster Algorithms. URL https://cran.r-project.org/web/packages/flexclust/flexclust.pdf Pebesma, E., Bivand, R., Rowlingson, B., Gomez-Rubio, V., Hijmans, R., Sumner, M., MacQueen, D. et al. (2015), Classes and Methods for Spatial Data. URL https://cran.r-project.org/web/packages/sp/sp.pdf R Development Core Team (2015), R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria.ISBN 3-900051-07-0, URL http://www.R-project.org/ Turner, R. (2015), Delaunay Triangulation and Dirichlet (Voronoi) Tessellation. URL https://cran.r-project.org/web/packages/deldir/deldir.pdf

Examples

exist <- eppexist(pop = pop_epp, 
                  centers = centers_epp)

RichDeto/EPP documentation built on May 5, 2022, 10:23 p.m.