A 2-D bivariate choropleth with a built-in 2-D legend (via the optional
biscale package), e.g. GDP per capita x life expectancy in one map.
Usage
bivariate_map(
data,
fill_x,
fill_y,
palette = "GrPink",
dim = 3,
projection = "equal_earth"
)Value
A ggplot object (the map; combine with biscale::bi_legend() for a
standalone legend).
Examples
if (FALSE) { # \dontrun{
world_data(2020, c(gdp = "NY.GDP.PCAP.KD", life = "SP.DYN.LE00.IN"),
geometry = "sf") |>
bivariate_map(gdp, life)
} # }
