ISWong | R Documentation |
Wong's segregation index is a development of
ISDuncan
's which takes into account the interactions
between spatial units (common boundaries and perimeter/area ratio).
The function can be used in two ways: to provide spatial data (
boundaries matrix, a perimeter vector and an area vector)
or a external geographic information source (spatial object or shape file).
ISWong(x, b = NULL, a = NULL, p = NULL, ptype = 'int', variant = 's',
spatobj = NULL, folder = NULL, shape = NULL)
x |
an object of class matrix (or which can be coerced to that class), where each column represents the distribution of a group within spatial units. The number of columns should be greater than 1 (at least 2 groups are required). You should not include a column with total totals because this will be interpreted as a group |
b |
a common boundaries matrix where each element Bij equals the shared boundary of i-th and j-th spatial units. |
a |
a numeric vector containing spatial unit areas |
p |
a numeric vector containing spatial units perimeters. |
ptype |
a string variable giving two options for perimeter calculation when a spatial object or shapefile is provided: 'int' to use only interior boundaries of spatial units, and 'all' to use entire boundaries, including the boundaries to the exterior |
variant |
a character variable that allows to choose the index version: variant = 's' for the index adjusted for contiguous spatial/organizational units boundary lengths and perimeter/area ratio (by default) and variant = 'w' for the version based only on shared boundaries length |
spatobj |
a spatial object (SpatialPolygonsDataFrame) with geographic information |
folder |
a character vector with the folder (directory) name indicating where the shapefile is located on the drive |
shape |
a character vector with the name of the shapefile (without the .shp extension). |
A numeric vector containing Wong's segregation index values for each group
Wong D. W. S. (1998) Measuring multiethnic spatial segregation. Urban Geography, 19 (1), pp. 77-87.
One-group evenness indices:
ISDuncan
, Gini
, Gorard
,
HTheil
, 'Atkinson
, ISMorrill
,
ISMorrillK
Between groups dissimilarity indices:
DIDuncan
, Gini2
,
DIMorrill
, DIMorrillK
, DIWong
x <- segdata@data[ ,1:2]
bound <- boundaries(segdata)
per <- perimeter(segdata)
ar <- area(segdata)
foldername <- system.file('extdata', package = 'OasisR')
shapename <- 'segdata'
ISWong(x, b = bound, p = per, a = ar)
ISWong(x, spatobj = segdata, variant = 's', ptype = 'int')
ISWong(x, folder = foldername, shape = shapename, variant = 'w')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.