cloromap: This function creates cloropleth maps

View source: R/ipv.R

cloromapR Documentation

This function creates cloropleth maps

Description

Given a spatail dataframe, creates a cloropleth map from the valaues of one of the variables in the @data slot

Usage

cloromap(
  sp,
  var.sp,
  df,
  var.df,
  var,
  sub.var = NULL,
  sub.set = NULL,
  legend.title = NULL,
  logcolor = FALSE,
  graf.title = NULL,
  ...
)

Arguments

sp

Spatial dataframe, in whose @data slot variable var.sp defines the aggregation zones.

var.sp

Variable whose values specify the spatail aggregation.

df

Ordinary dataframe with variable var.df matching var.sp.

var.df

Variable matching var.sp; both need to have the same levels.

var

Variable to code with color. Must be a column of df.

sub.var

Variable in sp, optionally used to subset sp.

sub.set

Vector of values of sub.var defining a subser of rows of sp.

legend.title

Legend heading

logcolor

FALSE if linear color scale, TRUE if logarithmic.

graf.title

Heading of the graph.

...

Optional additional parameters to pass to the underlying ggplot function.

Value

A map, of ggplot2 format, printed by default.


FernandoTusell/ipv documentation built on Nov. 7, 2022, 6:03 a.m.