Skip to contents

Generate Point Spatial DataFrame

Usage

spdf_points(.data, lat = "latitude", long = "longitude", crs = 4326)

Arguments

.data

Location data as a data frame, use extract_facilities

lat

Column name for latitude, default value is latitude

long

Column name for longitude, default value is longitude

crs

Coordinate Reference System, default value is EPSG Code for WGS 1984

Value

list of spatial data frames

Examples

if (FALSE) {

cntry <- "Ethiopia"
level_fac <- grabr::get_ouorglevel(operatingunit = cntry, org_type = "facility")
df_facs <- extract_locations(country = cntry, level = level_fac)
df_facs <- df_facs %>% extract_facilities()
df_locs <- df_facs %>% select(-c(geom_type:nested))

spdf <- spdf_points(.data = df_locs)
}