Description Usage Arguments Details Value Author(s) Examples
Plot Maps
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | map.plot(data, variable = NULL, longitude = "long",
latitude = "lat", fill.color.low = muted("red"),
fill.color.mid = "white",
fill.color.high = muted("green"), space = "Lab",
midpoint = mean(data[[variable]], na.rm = TRUE),
path.color = "white", title = NULL, title.size = 15,
title.hjust = 0.5, xlab = NULL, ylab = NULL,
barheight = 15, formatter = percent,
legend.position = c("right", "bottom", "left", "top", "none"),
lhs = NULL, rhs = NULL,
facet = c("none", "facet_wrap", "facet_grid"),
wrap.nrow = NULL, wrap.ncol = NULL,
scales = c("fixed", "free", "free_y", "free_x"),
gradient = "2")
|
data |
|
variable |
Character indicating which column should be plotted. |
longitude |
Character indicating which column stores longitude values. |
latitude |
Character indicating which column stores latitude values. |
fill.color.low |
Color to use for bottom of gradient. |
fill.color.mid |
Color to use for middle of gradient. |
fill.color.high |
Color to use for top of gradient. |
space |
Color space to use for gradient. |
midpoint |
Position of mid point of scale, defaults to 0. |
path.color |
Color to use for shapefile lines. |
title |
Title of plot. |
title.size |
Size of |
title.hjust |
Horizontal adjustment of |
xlab |
X-axis label. |
ylab |
Y-axis label. |
barheight |
Height of legend bar. |
formatter |
How the legend numbers should be formatted. Takes a function. |
legend.position |
Position of legend. |
lhs |
Left side of formula to use for facetting. |
rhs |
Right side of formula to use for facetting. |
facet |
The type of facetting, if any, to use. |
wrap.nrow |
The number of rows to to use when using facet_wrap. |
wrap.ncol |
The number of columns to to use when using facet_wrap. |
scales |
The scales to be employed when faceting. |
gradient |
1 means scale_colour_gradient, 2 means scale_colour_gradient2 |
Takes a data.frame
containing shapefile
data and plots it along with some measure.
Will probably need to make changes for when plotting continuous data.
A ggplot object.
Jared P. Lander
1 2 3 4 5 6 | ## Not run:
nyc.income <- join(nyc.df, income2010, by="Key")
mana <- nyc.income[nyc.income$County == 61, ]
map.plot(mana, "Median.Income", formatter=multiple_format(extra=dollar, multiple="K"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.