mxhexbin_choropleth | R Documentation |
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
)
df |
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. |
title |
An optional title for the map. |
legend |
An optional name for the legend. |
num_colors |
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. |
zoom |
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 |
label_color |
An optional color for the state abbreviation labels |
label_size |
An optional size for the state abbrevition labels |
shadow_color |
An optional shadow color for the state abbreviation labels |
auto_contrast |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.