neighbourmap {GeoXp}R Documentation

Neighbour plot and map

Description

The function neighbourmap() identifies spatial outliers by comparing a variable value for a particular site with these of its neighbouring sites. It draws a scatterplot of the values of the variable at neighbouring sites for a neighbourhood structure given by a binary weight matrix W and links this scatterplot with a map.

Usage

neighbourmap(long, lat, var, W, id=FALSE, listvar=NULL, listnomvar=NULL, carte=NULL,
criteria=NULL, label="", cex.lab=1, pch=16, col="blue", xlab="",ylab="",
axes=FALSE, lablong="", lablat="") 

Arguments

long a vector x of size n
lat a vector y of size n
var a vector of numeric values of size n
W A spatial weigth matrix of size n x n
id If TRUE, drawing the linear curve y=x
listvar matrix of variables which permit to plot bubbles on map or add a graphic using the tk window
listnomvar a list with names of variables listvar
carte matrix with 2 columns for drawing spatial polygonal contours : x and y coordinates of the vertices of the polygon
criteria a vector of size n of boolean which permit to represent preselected sites with a cross, using the tcltk window
label a list of character of size n with name of site. Names are printed on map after a selection
cex.lab character size of label
pch 16 by default, symbol for selected points
col "blue" by default, color of the points on the neighbor plot
xlab a title for the graphic x-axis
ylab a title for the graphic y-axis
axes a boolean with TRUE for drawing axes on the map
lablong name of the x-axis that will be printed on the map
lablat name of the y-axis that will be printed on the map

Details

For a selected site j on the map, are represented on the map its neighbors, and on the graph, on the x-axis the value of var for this site, and in y-axis, the values of var for the neighbouring sites of j. For a selected point on the graph, the corresponding pair of sites is represented on the map with a link.

Value

Returns a matrix of size n x n of boolean with TRUE if pair (i,j) was in the last selection.

Note

When user selects sites on the graph or on the map, he cannot add a selection by using the other graphic.

Author(s)

Aragon Y., Thomas-Agnan C., Ruiz-Gazen A., Laurent T., Robidou L.

References

Aragon Yves, Perrin Olivier, Ruiz-Gazen Anne, Thomas-Agnan Christine (2009), Statistique et Econométrie pour données géoréférencées : modèles et études de cas

See Also

moranplotmap,makeneighborsw,normw,nonormmoran

Examples

# data oldcol

columbus <- readShapePoly(system.file("etc/shapes/columbus.shp",
package="spdep")[1])

list.OLD <- spdf2list(columbus)
contours.OLD <- list.OLD$poly
x.OLD <- list.OLD$X
y.OLD <- list.OLD$Y

W <- makeneighborsw(x.OLD , y.OLD,method="neighbor",4)
obs<-neighbourmap(x.OLD , y.OLD,columbus@data$CRIME, W,carte=contours.OLD,
criteria=(columbus@data$CRIME>mean(columbus@data$CRIME)),listvar=columbus@data,
listnomvar=names(columbus@data),id=TRUE,col="grey",pch=4)

[Package GeoXp version 1.4 Index]