A state hexbin map of data available from the INEGI API
hexbin_inegi(
token,
regions,
indicator,
title,
legend = "",
database = "BISE",
silent = FALSE
)
The INEGI registration token available from http://www3.inegi.org.mx/sistemas/api/denue/v1/tokenVerify.aspx
A vector of states to zoom in on. Elements of this vector must exactly match the names of states as they appear in the "region" column of ?df_mxstates.
Numeric indicator from the INEGI API
An optional title for the map.
An optional name for the legend.
The database to query. BIE (Banco de Informacion Economica) or BISE (Banco de Indicadores). Defaults to BIE.
Wether to print a text progress bar while downloading the INEGI API data
A choropleth
if (FALSE) {
data(df_mxstates)
## Insert token here
## If you don't have a token you can get one from:
## http://www3.inegi.org.mx//sistemas/api/indicadores/v1/tokenVerify.aspx
token <- "INSERT_TOKEN_HERE"
state_regions <- df_mxstate$region
## You can look up the numeric indicator codes at
## https://www.inegi.org.mx/servicios/api_indicadores.html
hexbin_inegi(token, state_regions, "6200205259")
}