The classic "population spikes" display: a triangular spike at each country
centroid whose height encodes the value. Like bubble_map() it is the
honest idiom for totals, with a different visual trade-off: spikes
overplot less in dense regions (Europe, the Caribbean) because they only
grow upward. Uses the polygon backend, so it needs only maps.
Arguments
- data
A country-level frame with
iso3cand theheightcolumn.- height
The column controlling spike height (unquoted).
- max_height
Height of the tallest spike, in degrees of latitude (default
20).- width
Base width of each spike, in degrees of longitude (default
1.6).- color
Spike colour (default a warm red).
- alpha
Spike fill transparency.
Examples
# \donttest{
if (requireNamespace("maps", quietly = TRUE)) {
spike_map(countryatlas::world_snapshot$countries, population)
}
# }
