Fork me on GitHub
library(mxmaps)

data("df_mxstate")
df_mxstate$value <- df_mxstate$pop
mxstate_choropleth(df_mxstate,
                    title = "Total population, by state") 

Change the color scale

library(mxmaps)
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()

A map with labels for each state

library("mxmaps")
library("geojsonio")
## 
## We recommend using rgdal v1.1-1 or greater, but we don't require it
## rgdal::writeOGR in previous versions didn't write
## multipolygon objects to geojson correctly.
## See https://stat.ethz.ch/pipermail/r-sig-geo/2015-October/023609.html
## 
## Attaching package: 'geojsonio'
## The following object is masked from 'package:base':
## 
##     pretty
library("ggplot2")
library("rgdal")
## Loading required package: sp
## rgdal: version: 1.1-10, (SVN revision 622)
##  Geospatial Data Abstraction Library extensions to R successfully loaded
##  Loaded GDAL runtime: GDAL 2.0.2, released 2016/01/26
##  Path to GDAL shared files: /usr/local/share/gdal
##  Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
##  Path to PROJ.4 shared files: (autodetected)
##  Linking to sp version: 1.2-3
library("rgeos")
## rgeos version: 0.3-19, (SVN revision 524)
##  GEOS runtime version: 3.4.2-CAPI-1.8.2 r3921 
##  Linking to sp version: 1.2-3 
##  Polygon checking: TRUE
library("maptools")
## Checking rgeos availability: TRUE
library("ggrepel")

df_mxstate$value <-  df_mxstate$indigenous / df_mxstate$pop 
gg <- mxstate_choropleth(df_mxstate, 
                         num_colors = 1,
                         title = "Percentage of the population that self-identifies as indigenous")


data("mxstate.topoJSON")
data("df_mxstate")

tmpdir <- tempdir()
# have to use RJSONIO or else the topojson isn't valid
write(RJSONIO::toJSON(mxstate.topoJSON), file.path(tmpdir, "state.topojson"))
states <- topojson_read(file.path(tmpdir, "state.topojson"))
## OGR data source with driver: GeoJSON 
## Source: "/tmp/diego/RtmpilnvfV/state.topojson", layer: "state"
## with 32 features
## It has 1 fields
# remove bad polygons
states <- gBuffer(states, byid=TRUE, width=0)


df_mxstate <- cbind(df_mxstate, data.frame(lon = coordinates(states)[,1],
                                           lat = coordinates(states)[,2]))
df_mxstate$group <- df_mxstate$state_abbr

gg +
  geom_text_repel(data = df_mxstate, aes(lon, lat, label = state_abbr), size = 3,
                  box.padding = unit(0.1, 'lines'), force = 0.5)