An R6 object for creating state-level choropleths.

An R6 object for creating state-level choropleths.

Super class

choroplethr::Choropleth -> MXStateChoropleth

Methods

Public methods

Inherited methods

Method new()

Initialize the map of Mexico

Usage

MXStateChoropleth$new(user.df)

Arguments

user.df

df

Returns

A new `MXStateChoropleth` object.


Method clone()

The objects of this class are cloneable with this method.

Usage

MXStateChoropleth$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

library(viridis) library(scales) df_mxstate$value <- df_mxstate$indigenous / df_mxstate$pop gg = MXStateChoropleth$new(df_mxstate) gg$title <- "Percentage of the population that self-identifies as indigenous" gg$set_num_colors(1) gg$ggplot_scale <- scale_fill_viridis("percent", labels = percent) gg$render()