Hexagonal tiles of the states of Mexico
mxhexbin_choropleth(
df,
title = "",
legend = "",
num_colors = 7,
zoom = NULL,
label_color = "black",
label_size = 4.5,
shadow_color = NULL,
auto_contrast = NULL
)
A data.frame with a column named "region" and a column named "value". Elements in the "region" column must exactly match how regions are named in the "region" column in ?df_mxstate.
An optional title for the map.
An optional name for the legend.
The number of colors to use on the map. A value of 1 will use a continuous scale, and a value in [2, 9] will use that many colors.
An optional vector of states to zoom in on. Elements of this vector must exactly match the names of countries as they appear in the "region" column of ?country.regions
An optional color for the state abbreviation labels
An optional size for the state abbrevition labels
An optional shadow color for the state abbreviation labels
Optional argument to automatically determine the best contrast for the state abbreviation labels
data(df_mxstate)
df_mxstate$value <- df_mxstate$pop
mxhexbin_choropleth(df_mxstate, num_colors = 1)