Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function ginimap()
computes a Lorentz curve from name.var
and calculates the Gini Index associated to name.var
.
1 2 3 |
sp.obj |
object of class extending Spatial-class |
name.var |
a character; attribute name or column number in attribute table |
names.attr |
names to use in panel (if different from the names of variable used in sp.obj) |
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 histogram |
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 |
Users have the possibility to choose a threshold by mouse clicking on the Lorentz curve or by specifying it in the menu. The corresponding
pair (F,G) and the value of name.var
are then printed on the graph and the sites
with a value of name.var
lower or equal to the threshold are then selected on the map.
In the case where user click on 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.
The Gini Index is given in the tcltk window (see function gini
for the formula used to calculate it).
Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ######
# 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"))
# a basic usage ...
ginimap(eire,"INCOME")
# ... with options
ginimap(eire,"INCOME",criteria=(eire$pale==1),
identify=TRUE, pch=5, col="orange",
axes=TRUE, lablong="X", lablat="Y")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.