Learn R Programming

redist (version 3.0.7)

redist.choropleth: Creates a Choropleth

Description

Creates a Choropleth

Usage

redist.choropleth(
  shp,
  fill = NULL,
  fill_label = "",
  title = "",
  grad = 1,
  lwd = 0
)

Arguments

shp

A SpatialPolygonsDataFrame or sf object. Required.

fill

A numeric/integer vector with values to color the plot with. Optional.

fill_label

A string title of plot. Defaults to empty string. Optional.

title

A string title of plot. Defaults to empty string. Optional.

grad

Number of colors to make a gradient with. Accepts values of 1 or 2.

lwd

Line width. Defaults to 0

Value

ggplot map

Details

Creates a basic choropleth for a provided shp with value. Recommended to normalize data to avoid absolute values, in most use cases.