This is the main function of the package. mf_map can be used to plot all types of maps. The three main arguments are: x (sf object), var (variable to map), and type (map type).

Relevant arguments and default values are detailed in specific functions.

Maps types:

• base, base maps (mf_base);

• prop, proportional symbols maps (mf_prop);

• choro, choropleth maps (mf_choro);

• typo, typology maps (mf_typo);

• symb, symbols maps (mf_symb);

• prop_choro, proportional symbols maps with symbols colors based on a quantitative data classification (mf_prop_choro);

• prop_typo, proportional symbols maps with symbols colors based on qualitative data (mf_prop_typo);

• symb_choro, symbols maps with symbols colors based on a quantitative data classification (mf_symb_choro).

mf_map(
x,
var,
type = "base",
breaks,
nbreaks,
pal,
alpha = 1,
inches,
val_max,
symbol,
col,
lwd_max,
val_order,
pch,
cex,
border,
lwd,
bg,
col_na,
cex_na,
pch_na,
leg_pos,
leg_title,
leg_title_cex,
leg_val_cex,
leg_val_rnd,
leg_no_data,
leg_frame,
...
)

## Arguments

x object of class sf or sfc name(s) of the variable(s) to plot one of "base", "prop", "choro", "typo", "symb", "grad", "prop_choro", "prop_typo", "symb_choro" either a numeric vector with the actual breaks, or a classification method name (see mf_get_breaks) number of classes a set of colors or a palette name (from hcl.colors) if pal is a hcl.colors palette name, the alpha-transparency level in the range [0,1] size of the biggest symbol (radius for circles, half width for squares) in inches. maximum value used for proportional symbols type of symbols, 'circle' or 'square' color line width of the largest line values order, a character vector that matches var modalities pch for symbols cex for symbols border color border width background color color for missing values cex for NA values pch for NA values position of the legend, one of 'topleft', 'top','topright', 'right', 'bottomright', 'bottom', 'bottomleft', 'left' or a vector of two coordinates in map units (c(x, y)). If leg_pos is 'n' then the legend is not plotted. legend title size of the legend title size of the values in the legend number of decimal places of the values in the legend label for missing values whether to add a frame to the legend (TRUE) or not (FALSE) whether to add the layer to an existing plot (TRUE) or not (FALSE) further parameters from plot for sfc objects

## Value

x is (invisibly) returned.

## Examples

mtq <- mf_get_mtq()
mf_map(mtq)
mf_map(mtq, var = "POP", type = "prop")
mf_map(mtq, var = "MED", type = "choro")
mf_map(mtq, var = "STATUS", type = "typo")
mf_map(mtq)
mf_map(mtq, var = "STATUS", type = "symb")
mf_map(mtq)
mf_map(mtq, var = "POP", type = "grad")
mf_map(mtq)
mf_map(mtq, var = c("POP", "MED"), type = "prop_choro")
mf_map(mtq)
mf_map(mtq, var = c("POP", "STATUS"), type = "prop_typo")
mf_map(mtq)
mf_map(mtq, var = c("STATUS", "MED"), type = "symb_choro")