This is a quick way to make a bar chart, a Cleveland dotplot, or a histogram from a set of data, filled by geographic level.
geo_level_plot(
data,
name = name,
value = value,
level = level,
type = c("col", "hist", "point"),
hilite = "dodgerblue",
title = NULL,
dark_gray = "gray20",
light_gray = "gray60",
...
)
A data frame to use for plotting.
Bare column name containing names, i.e. independent variable.
Bare column name containing values, i.e. dependent variable.
Bare column name containing geographic levels for fill.
String: one of "col"
(bar chart), "point"
(dot plot), or "hist"
(histogram); defaults "col"
.
String giving the highlight color, used for the lowest geography present.
String giving the title, if desired, for the plot.
String giving the named gray color for the highest geography; defaults "gray20"
.
String giving the named gray color for the second lowest geography; defaults "gray60"
.
Any additional parameters to pass to the underlying geom function.
A ggplot