generate_map_colours: Generate color indices

Description Usage Arguments Value Author(s) References Examples

View source: R/generate_map_colours.R

Description

Generate color indices for shape object with the aim to color neighboring objects with distinct colors.

Usage

1
generate_map_colours(sp, verbose = TRUE)

Arguments

sp

A SpatialPolygonsDataFrame object

verbose

logical. Should R report extra information on progress?

Value

Color index vector

Author(s)

Modified from the code by Karl Ove Hufthammer from http://r-sig-geo.2731867.n2.nabble.com/Colouring-maps-so-that-adjacent-polygons-differ-in-colour-td6237661.html; modifications by Leo Lahti and Juuso Parkkinen

References

See citation("gisfin")

Examples

1
2
sp.suuralue <- get_helsinki_aluejakokartat(map.specifier="suuralue");
          cols <- factor(generate_map_colours(sp=sp.suuralue));

rOpenGov/gisfin documentation built on May 26, 2019, 8:48 p.m.