% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mf_map_help.R
\name{mf_map_prop_choro}
\alias{mf_map_prop_choro}
\title{Plot proportional symbols with choropleth coloration}
\arguments{
\item{x}{object of class \code{sf} (polygons or points)}

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

\item{type}{"prop_choro"}

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

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

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

\item{breaks}{either a numeric vector with the actual breaks, or a
classification method name. The main methods are 'quantile',
'equal', 'msd', 'ckmeans' (natural breaks), 'Q6' and 'geom'.
See \link{mf_get_breaks} for details.}

\item{nbreaks}{number of classes}

\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_seq 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{border}{border color of proportional symbols, a hex code or
color name given by \link{colors}. The default color is the background color (see
\link{mf_theme}).}

\item{lwd}{border width of proportional symbols}

\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_choro} type creates symbols that are proportional
to values of a first variable and colored to reflect the classification of a
second 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. This map type
is not available for lines.
\subsection{Usage}{

For polygons and points:

\if{html}{\out{<div class="sourceCode r">}}\preformatted{mf_map(x, var, type = "prop_choro",
       inches = 0.3, val_max,  symbol = "circle",
       pal, rev = FALSE, breaks = "quantile", nbreaks,
       border, lwd = 0.7, col_na = "white",
       alpha, expandBB, extent, bg, add = TRUE, leg_*)
}\if{html}{\out{</div>}}
}
}
\details{
Legend arguments that need two values are: 'leg_title',
'leg_val_rnd', and 'leg_horiz'. The first
values refers to the proportional symbols legend, the second one to the
choropleth legend.
}
\examples{
mtq <- mf_get_mtq()
mf_map(mtq)
mtq[6, "MED"] <- NA
mf_map(
  x = mtq, var = c("POP", "MED"), type = "prop_choro",
  inches = .2,
  val_max = 90000, symbol = "circle",
  col_na = "grey90", pal = "Cividis",
  breaks = "msd", nbreaks = 4, lwd = 1,
  leg_pos = "topright",
  leg_title = c("Population", "Median Income"),
  leg_val_rnd = c(0, 1),
  leg_horiz = c(TRUE, FALSE),
  leg_title_cex = .9,
  leg_val_dec = ",",
  leg_val_cex = .8,
  leg_size = 1,
  add = TRUE
)
}
\seealso{
\code{\link[=mf_map]{mf_map()}}, \link{mf_map_prop}, \link{mf_map_choro}, \code{\link[=mf_distr]{mf_distr()}},
\code{\link[=mf_get_breaks]{mf_get_breaks()}}, \code{\link[=mf_get_pal]{mf_get_pal()}}
}
