View source: R/geo_level_plot.R
geo_level_plot | R Documentation |
ggplot
to view data by geographic levelThis 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",
...
)
data |
A data frame to use for plotting. |
name |
Bare column name containing names, i.e. independent variable. |
value |
Bare column name containing values, i.e. dependent variable. |
level |
Bare column name containing geographic levels for fill. |
type |
String: one of |
hilite |
String giving the highlight color, used for the lowest geography present. |
title |
String giving the title, if desired, for the plot. |
dark_gray |
String giving the named gray color for the highest geography; defaults |
light_gray |
String giving the named gray color for the second lowest geography; defaults |
... |
Any additional parameters to pass to the underlying geom function. |
A ggplot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.