View source: R/precartogramR.R
precartogramR | R Documentation |
Make a pre cartogram analysis
precartogramR(
data,
method = c("gsm", "gn", "dcn", "GastnerSeguyMore", "GastnerNewman",
"DougenikChrismanNiemeyer"),
gridpower2 = 8:11,
pf = 1.5,
verbose = FALSE
)
data |
a sf object which contains at least two columns:
obviously a geometry column (giving the map) and a column which
contains a count by region (leading to a density by region,
density to be equalized by deformation). Each row of |
method |
the method to be used, can be one of the following:
|
gridpower2 |
a vector of exponent (to be raised at the power of 2) that
gives the log2(size) of the grid (default to |
pf |
Determines space between map and boundary (default to 1.5);
meaningful for method |
verbose |
a boolean object to set on verbose mode (default to |
either a dbv.cartogramR
object (if method
is dcn
or DougenikChrismanNiemeyer
) see dist_between_vertices
for details or
a gridanalysis.cartogramR
(if method
is gsm
or GastnerSeguyMore
(default), gn
or
GastnerNewman
) see grid_analysis for details
Dougenik, J., Chrisman, R. & Niemeyer, D. (1985). An algorithm to construct continuous area cartograms. Professional Geographer 37: 75-81.
Gastner, M. & Newman, M.E.J. (2004). Diffusion-based method for producing density equalizing maps. Proc. Natl. Acad. Sci. USA, 101:7499-7504
Gastner, M., Seguy, V. & More, P. (2018). Fast flow-based algorithm for creating density-equalizing map projections. Proceedings of the National Academy of Sciences USA, 115:E2156-E2164
data(usa)
precarto <- precartogramR(usa)
plot(precarto)
summary(precarto)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.