cartogramR: Make a continuous cartogram (density equalizing maps)

Description Usage Arguments Value References Examples

View source: R/cartogramR.R

Description

Make a continuous cartogram (density equalizing maps)

Usage

1
2
3
4
5
6
7
cartogramR(
  data,
  count,
  method = c("gsm", "gn", "dcn", "GastnerSeguyMore", "GastnerNewman",
    "DougenikChrismanNiemeyer"),
  options = NULL
)

Arguments

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 data is a region and contains the simple feature geometry of type POLYGON or MULTIPOLYGON. Polygon ring directions are not checked but exterior ring must counter clockwise and holes clockwise (use option check_ring_dir of sf::st_read to achieve the right orientation of ring direction on import or use check_ring_dir function)

count

a character string which indicates the name of the column (in data object) which contains the count by region.

method

the method to be used, can be one of the following: gsm or GastnerSeguyMore (default), gn or GastnerNewman, dcn or DougenikChrismanNiemeyer.

options

a named list given to cartogramR_options function which process options see cartogramR_options for details. Default to NULL.

Value

A list with the following components:

References

Examples

1
2
3
4
  data(usa)
  carto <- cartogramR(usa, "electors64")
  plot(carto)
  summary(carto)

cartogramR documentation built on Oct. 11, 2021, 9:08 a.m.