Static Maps

Functions for drawing non-interactive maps with ggplot2

mxhexbin_choropleth()

Create a state-level hexbin choropleth

mxstate_choropleth()

Create a state-level choropleth

mxmunicipio_choropleth()

Create a municipio-level choropleth

Interactive Maps

Functions for drawing zoomable maps with leaflet

mxstate_leaflet()

Create a state-level interactive map

mxmunicipio_leaflet()

Create a municipio-level interactive map

INEGI API Maps

Functions for drawing static maps with INEGI data

choropleth_inegi()

Static maps with INEGI data

hexbin_inegi()

Hexbin map with INEGI data

Datasets

Official datasets from the INEGI and CONAPO

df_mxmunicipio

Mexican municipio dataset

df_mxstate

Mexican states dataset

mxhexbin.map

Hexbin map of Mexican states

mxstate.map

Map of Mexican States

mxmunicipio.map

Map of the all Mexican municipios and alcaldías

mxstate.topoJSON

TopoJSON of Mexican states

mxmunicipio.topoJSON

TopoJSON of Mexican municipios and alcaldías

Helper functions

Helps add leading zeros to the municipio and state codes

str_mxmunicipio()

Format municipio codes with leading zeroes

str_mxstate()

Format state codes with leading zeroes

R6 classes

If you ever need to modify the way static maps are plotted

MXHexBinChoropleth

An R6 object for creating state-level hexbin choropleths.

MXStateChoropleth

An R6 object for creating state-level choropleths.

MXMunicipioChoropleth

An R6 object for creating municipio-level choropleths.

Package

mxmaps package

mxmaps

mxmaps package