Hola,
library("ggplot2")
library("mxmaps")
df_mxstate_2020$value <- df_mxstate_2020$indigenous_language /
df_mxstate_2020$pop * 100
df_mxstate_2020$value[1:5] <- NA
mxstate_choropleth(df_mxstate_2020,
num_colors = 1,
title = "Percentage of the population that speaks\nan indigenous language",
legend = "%") +
# Add a fake color scale which we'll change to 'no data'
geom_point(data = df_mxmunicipio_2020[1,],
size = -1,
aes(color = "",
group = NA)) +
scale_color_manual(values = NA) +
scale_fill_continuous(low="orange", high="darkred",
guide="colorbar", na.value="blue") +
guides(color=guide_legend("no data",
override.aes=list(color = "blue",
shape = 15,
size = 7)))