Description Usage Arguments Details Value Author(s) See Also Examples
Draws a choropleth map given a spatialPolygons object, a variable and a shading scheme.
1 | choropleth(sp, v, shading = auto.shading(v), ...)
|
sp |
A |
v |
The variaqble to be mapped. Must have the same number of elements as |
shading |
A shading scheme created by |
... |
Additional parameters to be passed on to the |
The function returns no value, but draws a choropleth map on the current graphics device as a side effect.
None (see above).
Chris Brunsdon
choro.legend
, auto.shading
, shading
.
1 2 3 4 5 6 7 | # Read in map data and compute a rate for mapping
sids <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
proj4string=CRS("+proj=longlat +ellps=clrk66"))
sids.rate=10000*sids$SID74/sids$BIR74
# Create the shading scheme, plot a choropleth map
shades = auto.shading(sids.rate,cols=brewer.pal(5,'Blues'))
choropleth(sids,sids.rate,shades)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.