Non-overlapping proportional circles sized by weight, positioned to stay
as close as possible to each country's true location – arguably the most
legible cartogram variant, since a microstate's circle is exactly as
visible as a giant country's. A first-class verb for
cartogram_map()(type = "dorling") that surfaces the Dorling-specific
tuning knobs.
Arguments
- data
An
sfmap-ready frame.- weight
The column controlling circle size (unquoted).
- fill
Optional fill column (unquoted); defaults to
weight.- k
Share of the bounding box filled by the largest circle (default
5; passed tocartogram::cartogram_dorling()).- itermax
Maximum iterations of the circle-repulsion algorithm (default
1000; raise it if circles still overlap in the result).- projection
Projection; an equal-area CRS is recommended. See
world_map()for the projections available.
Examples
# \donttest{
if (requireNamespace("sf", quietly = TRUE) &&
requireNamespace("rnaturalearth", quietly = TRUE) &&
requireNamespace("cartogram", quietly = TRUE)) {
attach_geometry(countryatlas::world_snapshot$countries, geometry = "sf") |>
dorling_map(population)
}
# }
