dorling_from_sp: Compute center coordinates, circle radii and Dorling polygons...

Description Usage Arguments Value Note Author(s)

Description

Pass in an equal area (not long-lat) projected SpatialPolygonsDataFrame and get back what you need to plot a Doriling cargogram.

Usage

1
2
dorling_from_sp(polys, value, n_rescales = 50, n_iter = 50, tol = 1000,
  quiet = TRUE)

Arguments

polys

SpatialPolygonsDataFrame

value

values that correspond to the ordered polygons in polys

n_rescales, n_iter, tol

tuning parameters for computing non-overlapping circle polygon radius values. Tweak only if the defaults do not work well.

quit

if TRUE (default) do not show the scaling iterations

Value

a list with xy coordinate matrix, radius vector, and disc SpatialPolygons

Note

There is a significant limitation in that the polygons have to all be touching (i.e. this is why the README has an example w/o Alaska and Hawaii). If neighbors were computed separately or allowed to be passed in, this could be made more generic. PRs & Issues welcome.

Author(s)

Mathieu Rajerison https://datagistips.hypotheses.org/


hrbrmstr/spdorling documentation built on May 13, 2019, 1:35 p.m.