This function is called by the cov_water module and downloads distance to inland water data from Worldpop
cov_water(shape, country_code, async = FALSE)
a SpatRaster object when async
is FALSE
or a PackedSpatRaster
when async
is TRUE
.
if (FALSE) { # \dontrun{
df_path <- system.file("extdata", "lie.csv", package = "disagapp")
df <- read.csv(df_path)
lie_shape <- resp_download(df, "area", "response", "LIE", "ADM1")
raster <- cov_water(lie_shape, "LIE", 2022)
} # }