hs_facilities.Rd
Get all health facilities within a given country or extent
hs_facilities( country = NULL, extent = NULL, geometry_type = c("POINT", "point", "GEOMETRY", "geometry") )
country | the name of the country of interest |
---|---|
extent | either a numeric vector (xmin, ymin, xmax, ymax) or objects of class sf, sfc, ‘Spatial’ or ‘Raster’ using geographical projection (epsg:4326) |
geometry_type | specify the type of geometry you want, either "POINT" or "point" to have point geometry. You can use "GEOMETRY" or "geometry" to have a mix of points and multipolygons. |
an object of class 'sf'
if (FALSE) { extent <- c(xmin = -12.17, ymin = 10.1, xmax = 4.27, ymax = 24.97) hs_extent <- hs_facilities(extent = extent, geometry = "POINT") str(hs_extent) if (require(sf)) plot(st_geometry(hs_extent)) if (require(rnaturalearth)) { mli <- ne_countries(country = "Mali", returnclass = "sf") hs_bbx_mli <- hs_facilities(extent = mli) str(hs_bbx_mli) if (require(sf)) { plot(st_geometry(mli)) plot(st_geometry(hs_extent)) } } }