% Generated by roxygen2: do not edit by hand % Please edit documentation in R/map.R \name{add_indicator_layer} \alias{add_indicator_layer} \title{Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values} \usage{ add_indicator_layer( poly, col, buffer = NULL, n = 5, style = "pretty", palette = pal_reach("red_5"), as_count = TRUE, color_na = cols_reach("white"), text_na = "Missing data", legend_title = "Proportion (\%)", legend_text_separator = " - ", border_alpha = 1, border_col = cols_reach("lt_grey_1"), lwd = 1, ... ) } \arguments{ \item{poly}{Multipolygon shape defined by sf package.} \item{col}{Numeric attribute to map.} \item{buffer}{A buffer, either one value or a vector of 4 values (left, bottom, right, top).} \item{n}{The desire number of classes.} \item{style}{Method to process the color scale for continuous numerical variables. See `classInt::classIntervals()` for details.} \item{palette}{Vector of fill colors as hexadecimal values. For REACH color palettes, it is possible to use `pal_reach()`. For now,'palette' must be changed manually, accordingly to the number of drawn classes.} \item{as_count}{Boolean. When col is a numeric variable, should it be processed as a count variable? For instance, 0, 1-10, 11-20.} \item{color_na}{Fill color for missing data.} \item{text_na}{Legend text for missing data.} \item{legend_title}{Legend title.} \item{legend_text_separator}{Text separator for classes. E.g. " to " will give 0, 1 to 10, 11 to 20.} \item{border_alpha}{Transparency of the border.} \item{border_col}{Color of the border.} \item{lwd}{Linewidth of the border.} \item{...}{Other arguments to pass to `tmap::tm_polygons()`.} } \value{ A tmap layer. } \description{ Wrapper around `tmap::tm_polygons()` with sane defaults for plotting indicator values }