An R6 object for creating municipio-level choropleths.

An R6 object for creating municipio-level choropleths.

Super class

choroplethr::Choropleth -> MXMunicipioChoropleth

Public fields

show_states

boolean, draw state borders

Examples

library(viridis)
library(scales)

df_mxmunicipio_2020$value <-  df_mxmunicipio_2020$indigenous_language / df_mxmunicipio_2020$pop
gg = MXMunicipioChoropleth$new(df_mxmunicipio_2020)
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()