Description Usage Arguments Details Value Author(s) Examples
mapColorRamp
generates a map with a sequential theme of an interval scaled variable
1 2 3 | mapColorRamp(var.name, shape, breaks=8, map.title="",
legend.title=deparse(substitute(var.name)),
legend.pos="bottomleft", legend.cex=1, add.to.map=FALSE)
|
var.name |
A variable to be mapped in a bipolar theme. If it is in a data-frame,
then the data-frame must be refered to, e.g., |
shape |
An existing spatial polygon or spatial polygon data-frame |
breaks |
Number of qunatiles. It needs to range the range of 3 to 9 |
map.title |
Character string with map title |
legend.title |
Character string with legend title (default= |
legend.pos |
Location of legend in the map frame (default= |
legend.cex |
Relative font size of the legend |
add.to.map |
Logical to start a new map frame if |
The function mapColorRamp
maps an interval scaled variable by a
sequetial color ramp. Quantiles values are coded in gradually increasing
intensities of oranges. A legend is generated. NA's are permitted.
NULL
Michael Tiefelsdorf <tiefelsdorf@utdallas.edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(maptools)
validTractShp <- tractShp[!is.na(tractShp$BUYPOW), ] # Remove 2 tracts with NA's
mapColorQual(validTractShp$CITYPERI, validTractShp,
map.title="Cities and Peripherie in Dallas County",
legend.title="Regions")
mapColorRamp(validTractShp$bad1500D, validTractShp, breaks=9,
map.title="Density of Convenience Stores in Dallas County\nbw=1500 meters",
legend.title="Junk Food")
hist(tractShp$LRRmedD)
mapBiPolar(validTractShp$LRRmedD, validTractShp, break.value=0,
neg.breaks=5, pos.breaks=5,
map.title="LRR: log(f(junk food),f(healthy food))\nbw=medium",
legend.title="log relative risk")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.