merge_points: merge healthsite points from different sources for a country

Description Usage Arguments Value Examples

View source: R/merge_points.r

Description

IN DEVELOPMENT aim is to identify and remove duplicates first version just tests distance, between points in layer1 and 2 BUT problem maybe that there are points in each layer that are duplicates too may want to move this to separate package later

Usage

1
2
3
4
5
6
7
merge_points(
  country,
  datasources = c("healthsites", "who"),
  hs_amenity = c("clinic", "doctors", "pharmacy", "hospital"),
  dist_same_m = 50,
  toreturn = "summary"
)

Arguments

country

a character vector of country names or iso3c character codes.

datasources

vector of 2 datasources from 'healthsites' predownloaded, 'who', 'healthsites_live' needs API, 'hdx' not working yet

hs_amenity

filter healthsites data by amenity. 'all', 'clinic', 'dentist', 'doctors', 'pharmacy', 'hospital' to exclude dentist hs_amenity=c('clinic', 'doctors', 'pharmacy', 'hospital')

dist_same_m

distance below which a site from source 1 and 2 is considered same

toreturn

whether to return 'summary' or the merged 'sf' object

Value

sf

Examples

1
2
#merge_points("nigeria", datasources=c('who', 'healthsites'), plot='mapview')
#merge_points(c('malawi','zambia'))

afrimapr/afrihealthsites documentation built on June 12, 2021, 11:46 a.m.