MXMunicipioChoropleth: An R6 object for creating municipio-level choropleths.

Description Usage Format Examples

Description

An R6 object for creating municipio-level choropleths.

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Examples

1
2
3
4
5
6
7
8
9
library(viridis)
library(scales)

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

diegovalle/mxmaps documentation built on April 19, 2018, 1:45 a.m.