prevMap: static prevalence map for any subnational level

prevMapR Documentation

static prevalence map for any subnational level

Description

produce static map for any subnational level, with the option to focus on one admin-1 level

Usage

prevMap(
  res.obj,
  poly.shp,
  admin1.focus = NULL,
  value.to.plot = "mean",
  map.title = NULL,
  legend.label = "Estimates",
  threshold.p = NULL,
  color.palette = NULL,
  color.reverse = T,
  value.range = NULL,
  ...
)

Arguments

res.obj

result object from surveyPrev

poly.shp

polygon file for plotting

admin1.focus

if needed, the admin 1 level area name to create an individual focused prevalence map on

value.to.plot

statistics to appear on the map

map.title

title for the map

legend.label

label for the legend, such as 'Coefficient of Variation'

threshold.p

cutoff for the exceedance probability map

color.palette

which palette to use for plotting

color.reverse

whether to use reverse color scale

value.range

what range to plot, useful if want to compare plots using the same scale

...

arguments passed to mapPlot function from SUMMER package

Value

summer map object

Examples

## Not run: 
geo <- getDHSgeo(country = "Zambia", year = 2018)
cluster.info <- clusterInfo(geo = geo,
                            poly.adm1 = ZambiaAdm1,
                            poly.adm2 = ZambiaAdm2)
# "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits.
#  In previous versions of the package, it is labeled "ancvisit4+".
dhsData <- getDHSdata(country = "Zambia",
                                 indicator = "RH_ANCN_W_N4P",
                                 year = 2018)
data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P")
admin.info2 <- adminInfo(poly.adm = sf::st_as_sf(ZambiaAdm2), 
                         admin = 2, 
                         by.adm = "NAME_2", 
                         by.adm.upper = "NAME_1")
cl_res_ad2 <- clusterModel(data=data,
                  cluster.info = cluster.info,
                  admin.info = admin.info2,
                  model = "bym2",
                  admin = 2)

prevMap.adm2.central <- prevMap(res.obj=cl_res_ad2, 
                                       poly.shp=poly.adm2,
                                       admin1.focus = "Central")

## End(Not run) 


surveyPrev documentation built on June 19, 2026, 5:06 p.m.