From https://github.com/chxy/cartogram/blob/master/R/dorling.R Not exported here, but needed for aec_carto_f
A vector of region names.
A vector of x-coordinates of the regions.
A vector of y-coordinates of the regions.
A vector of the variable of interest. It will be used as the radii of the circles.
A list of the neighbors of every region. Each element is a vector of all the neighbor names of a region. If nbr=NULL, then it is assumed that no region has any neighbors. If nbr is not NULL, then names should be given to all the elements of the list, for matching the neighbors with the host region name, otherwise the parameter "name" (a character vector) will be used as the element names of nbr. Besides, any values in nbr that are not in "name" will be removed. The length of nbr could be different from the length of "name", but any element in nbr whose name is not in "name" will be removed too.
A matrix of the counts of shared borders, typically generated from the function border_summary_length()
. It is used to scale the attract force.
a vector of color to fill in the circles or polygons. Auto-completed if the length does not match with name.
Tolerant value for the sum of overlapped radii.
The threshold to determine whether an attract force is added. It is applied to the ratio of the distance between two centroids and the sum of the two radii.
The limit of the number of iterations. Default to be 9999.
The number of vertice of the circle. Default to be 100. If polygon.vertex=4 then diamonds applies. If polygon.vertex=6, then hexagon applies.
Whether to show the movements of centroids.
Only works when animation=TRUE.
whether to draw the lines between neighbor regions.
whether to print the region names on the circles or polygons.
whether to use ggplot2 to draw the cartogram.
other things