boxplotmap {GeoXp} | R Documentation |
The function boxplotmap()
draws a boxplot of the given variable $var$
and a map with site of coordinates (long
,lat
).
boxplotmap(long,lat,var,listvar=NULL, listnomvar=NULL,carte=NULL,criteria=NULL, label="", cex.lab=1,pch=16,col="grey",xlab="",ylab="",axes=FALSE, lablong="", lablat="")
long |
a vector x of size n |
lat |
a vector y of size n |
var |
a vector of numerical values of size n |
listvar |
matrix of variables which permit to plot bubbles on map or add a graphic using the tk window |
listnomvar |
list of character of size p with names of variables from 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 |
vector 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 |
"grey" by default, color of the boxplot |
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 |
There is an interactivity only in one direction : the sites selected by interquartile on the boxplot are represented on the map in red.
A vector of boolean of size n. TRUE if the site was in the last selection.
Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.
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
histomap
, histobarmap
, scattermap
, densitymap
# donnees oldcol example(columbus) coords <- coordinates(columbus) cont<-spdf2list(columbus)$poly boxplotmap(coords[,1], coords[,2],columbus@data$CRIME,listvar=columbus@data, carte=cont, listnomvar=names(columbus@data),criteria=(columbus@data$CP==1), xlab="Crime",ylab="Percent",label=columbus@data$COLUMBUS.I,cex.lab=0.7) # donnees boston data(boston) obs<-boxplotmap(boston.utm[,1],boston.utm[,2],boston.c$CRIM,listvar=boston.c, listnomvar=names(boston.c),criteria=(boston.c$CHAS==1)) # données eire data(eire) eire.contours<-polylist2list(eire.polys.utm) boxplotmap(eire.coords.utm$V1,eire.coords.utm$V2,eire.df$POPCHG, listvar=eire.df,listnomvar=names(eire.df),carte=eire.contours, xlab="Taux d'évolution de la population de 1921 à 1962",pch=7)