% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mf_map_help.R
\name{mf_map_prop_typo}
\alias{mf_map_prop_typo}
\title{Plot proportional symbols with typology coloration}
\arguments{
\item{x}{object of class \code{sf}}

\item{var}{names of the variables to map. The first value refers to the
proportional symbols, the second one to the typology coloration.}

\item{type}{"prop_typo"}

\item{inches}{size of the largest symbol in inches (radius for circles,
half width for squares)}

\item{lwd_max}{width of the largest line}

\item{val_max}{maximum value corresponding to the largest symbol or line}

\item{symbol}{type of proportional symbols, either "circle" or "square"}

\item{border}{border color for proportional symbols, a hex code or
color name given by \link{colors}. The default color is the background color (see
\link{mf_theme}).}

\item{pal}{a set of colors (hex codes) or a palette name. Palette names can
be obtained with \link{hcl.pals}. The default palette is the pal_quali palette
(see \link{mf_theme}).}

\item{rev}{if \code{pal} is a palette name, whether the ordering of the colors
should be reversed (TRUE) or not (FALSE)}

\item{val_order}{modalities order in the legend, a character vector that
matches \code{var} modalities. Default to alphabetic order of modalities.}

\item{col_na}{color for missing values, a hex code or
a color name given by \link{colors}.}

\item{alpha, expandBB, extent, bg, add}{arguments described in \link{mf_map}}

\item{leg_*}{legend arguments described in \link{mf_map}. See details for
arguments with two values.}
}
\value{
x is (invisibly) returned.
}
\description{
\code{mf_map()} with \strong{prop_typo} type creates symbols that are proportional
to values of a first variable and colored to reflect the modalities of a
second qualitative variable.

This map types uses two variables and some arguments need to be set for both
variables (see Details).

For polygons, centroids are used to plot proportional symbols.
\subsection{Usage}{

For polygons and points:

\if{html}{\out{<div class="sourceCode r">}}\preformatted{mf_map(x, var, type = "prop_typo",
       inches = 0.3, val_max, symbol, border,
       pal, rev = FALSE, val_order,
       border, lwd = 0.7, col_na = "white",
       alpha, expandBB, extent, bg, add = FALSE, leg_*)
}\if{html}{\out{</div>}}

For lines:

\if{html}{\out{<div class="sourceCode r">}}\preformatted{mf_map(x, var, type = "typo",
       lwd_max = 15,
       pal, rev = FALSE, val_order,
       col_na = "white",
       alpha, expandBB, extent, bg, add = FALSE, leg_*)
}\if{html}{\out{</div>}}
}
}
\details{
'leg_title' needs two values. The first value refers to the symbols legend,
the second one to the choropleth legend.
}
\examples{
mtq <- mf_get_mtq()
flows <- mf_get_mtq("lines")
mf_map(mtq, extent = flows, expandBB = c(0, .5, 0, 0))
mf_map(flows, c("fij", "sj"), "prop_typo",
  val_order = c("Sub-prefecture", "Simple municipality"),
  pal = c("steelblue", "lightblue"), lwd_max = 30,
  leg_pos = "topleft", leg_title = c("commuters", "destination")
)
mf_map(
  x = mtq, var = c("POP", "STATUS"), type = "prop_typo",
  inches = .2, border = "tomato4", lwd = 1,
  pal = c("darkblue", "steelblue", "lightblue"),
  val_order = c("Prefecture", "Sub-prefecture", "Simple municipality"),
  leg_pos = "bottomleft",
  leg_title = c("Population", ""),
  leg_no_data = "No dada",
  add = TRUE
)
}
\seealso{
\code{\link[=mf_map]{mf_map()}}, \link{mf_map_prop}, \link{mf_map_typo}, \code{\link[=mf_get_pal]{mf_get_pal()}}
}
