Description Usage Arguments Details Value Author(s) References See Also Examples
A function geared to making choropleth maps easier to construct for the US Census Data.
1 2 3 4 5 6 7 8 | choropleth(sp, dem = "P0010001",
cuts = list("quantile", seq(0, 1, 0.25)),
color = list(fun = "hsv", attr = list(h = c(0.4, 0.5, 0.6, 0.7),
s = 0.6, v = 0.6, alpha = 1)), main = NULL,
sub = "Quantiles (equal frequency)",
border = "transparent",
legend = list(pos = "bottomleft",
title = "Population Count"), type = "plot", ...)
|
sp |
|
dem |
a character string, this must be the name of one of the |
cuts |
a list containing "quantile" and |
color |
a list containing a function and list of arguments for the function to produce the requested color scheme. |
main |
a character string, this will be the title of the plot. |
sub |
a character string, this will be the subtitle on the plot. |
border |
a character string, this selects the border color of the polygons. |
legend |
a list containing first where to place the legend and second a title for the legend. |
type |
a character string, can be either "plot" or "spplot". |
... |
Only arguments available in |
choropleth
is simply a convenient front end for plot
and spplot
specifically for use in making quick choropleth maps of US Census data.
a plot or lattice object.
Zack W Almquist
Zack W. Almquist (2010). US Census Spatial and Demographic Data in R: The UScensus2000 Suite of Packages. Journal of Statistical Software, 37(6), 1-31. http://www.jstatsoft.org/v37/i06/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
data(oregon.county10)
###Using plot
choropleth(oregon.county10,"P0010001",
color = list(fun = "rainbow",
attr = list(4)),main="2010 Counties \n Oregon",type="plot",border="transparent")
###Using spplot
choropleth(oregon.county10,"P0010001",
main="2010 Counties \n Oregon",border="transparent",type="spplot")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.