
Last chance! 50% off unlimited learning
Sale ends in
dbledensitymap
plots two kernel density estimates from 2 variables included
in names.var
computed with bkde
, and a map with sites of coordinates
coordinates(sp.obj)
. Each site is associated to a value of names.var[1]
and
names.var[2]
and the two windows are interactive. dbledensitymap(sp.obj, names.var, kernel='triweight',
names.attr=names(sp.obj), criteria=NULL, carte=NULL, identify=FALSE, cex.lab=0.8, pch=16,
col=c("grey","lightblue3"), xlab=c("",""), ylab="", axes=FALSE, lablong="", lablat="")
save results
button,
a vector of integer is created as a global variable in last.select
object.
It corresponds to the number of spatial units selected just before leaving the Tk window.
Roger S.Bivand, Edzer J.Pebesma, Virgilio Gomez-Rubio (2009), Applied Spatial Data Analysis with R, Springer.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. New York: Springer.
Wand M.P. et Jones M.C. (1995), Kernel Smoothing, Chapman \& Hall.
histomap
, histobarmap
, scattermap
, densitymap
#########
# data auckland
data(auckland)
# creation of a Spatial object
auckland.sp = SpatialPoints(cbind(auckland$Easting,auckland$Northing))
# ... and then by integrating other variables to create SpatialPointsDataFrame
auckland.spdf = SpatialPointsDataFrame(auckland.sp, auckland)
# For more details, see vignette('sp', package="sp")
# optional : we add some contours that don't correspond to the spatial unit
# but are nice for mapping
contours.auckland<-polylist2list(auckpolys)
dbledensitymap(auckland.spdf, c("Deaths.1977.85","Under.5.1981"),carte=contours.auckland,
xlab=c("Deaths.1977.85","Under.5.1981"),
criteria=(auckland$Deaths.1977.85>mean(auckland$Deaths.1977.85)))
######
# data eire
require("maptools")
eire <- readShapePoly(system.file("etc/shapes/eire.shp", package="spdep")[1],
ID="names", proj4string=CRS("+proj=utm +zone=30 +units=km"))
dbledensitymap(eire,c("A","towns"),kernel="normal",
xlab=c("Individuals rate of blood type A",
"Surface urbaine"),identify=TRUE)
Run the code above in your browser using DataLab