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

Datasets

Official datasets from the INEGI and CONAPO

df_mxstate_2020

Mexican 2020 states dataset

df_mxmunicipio_2020

Mexican 2020 municipio dataset

df_mxstate

Mexican states dataset

df_mxmunicipio

Mexican municipio dataset

df_mxstate_2015

Mexican 2015 states dataset

df_mxmunicipio_2015

Mexican 2015 municipio dataset

df_mxstate_1990_2010

Mexican 1990-2010 states population dataset

df_mxmunicipio_1990_2010

Mexican 1990-2010 municipio population 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-package mxmaps

mxmaps package