Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function barnbmap
draws the bar plot of the link number distribution for
a neighbourhood structure given by a nb
object (spdep
package) and links
this bar plot with a map.
1 2 3 |
sp.obj |
object of class extending Spatial-class |
nb.obj |
object of class nb |
criteria |
a vector of boolean of size the number of spatial units, which permit to represent preselected sites with a cross, using the tcltk window |
carte |
matrix with 2 columns for drawing spatial polygonal contours : x and y coordinates of the vertices of the polygon |
identify |
if not FALSE, identify plotted objects (currently only working for points plots). Labels for identification are the row.names of the attribute table row.names(as.data.frame(sp.obj)). |
cex.lab |
character size of label |
pch |
16 by default, symbol for selected points |
col |
"lightblue3" by default, color of bars on the barplot |
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 |
For a selected site j on the map, are represented on the map its neighbours. For a selected bar on the graph, the corresponding sites are represented on the map with a link which means that two sites are neighbours.
No value returned.
When user select sites on the graph or on the map, he cannot add a selection by using the other graphic.
Thomas-Agnan C., Ruiz-Gazen A., Laurent T.
Thibault Laurent, Anne Ruiz-Gazen, Christine Thomas-Agnan (2012), GeoXp: An R Package for Exploratory Spatial Data Analysis. Journal of Statistical Software, 47(2), 1-23.
Roger S.Bivand, Edzer J.Pebesma, Virgilio Gomez-Rubio (2009), Applied Spatial Data Analysis with R, Springer.
moranplotmap
,makeneighborsw
,normw
,nonormmoran
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ######
# data on price indices of real estate in France
data(immob)
row.names(immob)<-immob$Nom
# immob is a data.frame object. We have to create
# a Spatial object, by using first the longitude and latitude
# to create Spatial Points object ...
immob.sp = SpatialPoints(cbind(immob$longitude,immob$latitude))
# Spatial weight matrix based on nearest neighbours
immob.nb <- dnearneigh(coordinates(immob.sp), 0,175000)
# a simple use of barnbmap
barnbmap(immob.sp,immob.nb)
######
# Data columbus
require("maptools")
example(columbus)
# col.gal.nb is a spatial weight matrix included in spdep package...
barnbmap(columbus,col.gal.nb,criteria=(columbus$EW==1),
col=colors()[98:106], identify=TRUE, cex.lab=0.7, pch=1:9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.