- Compute diversity indices over input layers
, diversity index
, renyi entrophy
r.series.diversity [-rshpgent] input=name[,name,...] output=name [alpha=number(s)[,number(s),...]] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
- Renyi enthropy index
- Richness index
- Shannon index
- Reversed Simpson index
- Gini-Simpson index
- Pielou's evenness index
- Shannon effective number of species
- Total counts
- Allow output files to overwrite existing files
- Print usage summary
- Verbose module output
- Quiet module output
- Force launching GUI dialog
- input=name[,name,...] [required]
- input layers
- input layers
- output=name [required]
- prefix name output layer
- Order of generalized entropy
- Options: 0.0-*
computes one or more diversity indices
based on 2 or more input layers. Each layer should represents a
species (or other categories being used), and its raster values the
category count/value. The name of the output layers will consist of
the base name provided by the user. Currently implemented are the
Renyi entropy index and a number of specialized cases of the Renyi
enthropy, viz.the species richness, the Shannon index, the Shannon
based effective number of species (ENS), the Simpson index (inverse
and gini variants), pielou's eveness (Legendre & Legendre, 1998).
The Renyi enthropy
This index quantify the diversity, uncertainty, or randomness of a
system. The user can define the order of diversity by setting the
) value. The order of a diversity indicates its
sensitivity to common and rare species. The diversity of order zero
( alpha = 0
) is completely insensitive to species
frequencies and is better known as species richness. Increasing the
order diminishes the relative weights of rare species in the
resulting index (Jost 2006, Legendre & Legendre 1998). The name of
the output layer is composed of the basename + renyi + alpha.
The species richness is simply the count of the number of layers.
It is a special case of the Reny enthropy: S = exp(R0)
is the species richness R0
the renyi index
. The name of the output layer is composed of the
basename + richness.
The Shannon (also called the Shannon-Weaver or Shannon-Wiener)
index is defined as H' = -sum(p_i x log(p_i))
, where p_i
is the proportional abundance of species i
. The function
uses the natural logarithm (one can also use other bases for the
log, but that is currently not implemented, and doesn't make a real
difference). Note the Shannon index is a special case of the Renyi
enthropy for alpha = 2
. The name of the output layer is
composed of the basename + shannon.
Effective number of species (ENS)
This option gives the Shannon index, converted to into equivalent or
effective numbers of species (also known as Hill numbers) (Lou Jost,
2006; Chase and Knight, 2013). The Shannon index, and other indice,
can be converted so they represent the number of equally abundant
species necessary to produce the observed value of diversity (an
analogue the concept of effective population size in genetics). An
advantage of the ENS is a more intuitive behavious, e.g., if two
communities with equally abundant but totally distinct species are
combined, the ENS of the combined community is twice that of the
original communities. See for an explanation and examples this
or this one
The name of the output layer is composed of the
basename + ens.
Pielou's eveness (equitability) index
Species evenness refers to how close in numbers each species in
an environment are. The evenness of a community can be represented
by Pielou's evenness index, which is defined as H' / Hmax
is the Shannon diversity index and Hmax the maximum value of H',
equal to log(species richness). Note that a weakness of this index
is its dependence on species counts, and more specifically that it
is a ratio of a relatively stable index, H', and one that is
strongly dependent on sample size, S. The name of the output layer
is composed of the basename + pielou.
Inverse Simpson index (Simpson's Reciprocal Index)
The Simpson's index is defined as D = sum p_i^2
. This is
equivalent to -1 * 1 / exp(R2)
, with R2
index for alpha=2
. With this index, 0 represents infinite
diversity and 1, no diversity. This is counterintuitive behavior for
a diversity index. An alternative is the inverse Simpson index,
which is defined as ID = 1 / D)
. The lowest value of this
index is 1 and represent a community containing only one species.
The higher the value, the greater the diversity. The maximum value
is the number of species in the sample. The name of the output layer
is composed of the basename + invsimpson.
Gini-Simpson index (Simpson's index of diversity)
An alternative way to overcome the problem of the counter-intuitive
nature of Simpson's Index is to use 1 - D)
Simpson, 1949). The index represents the probability that two
individuals randomly selected from a sample will belong to different
species. The value ranges between 0 and 1, with greater values
representing greater sample diversity. The name of the output layer
is composed of the basename + ginisimpson.
Note that if you are interested in the landscape diversity, you
should have a look at the
addon or the various related r.li.* addons (see
below). These functions requires one input layer and compute the
diversity using a moving window.
Currently when working with very large raster layers and many
input layers, computations can take a long time. On the todo list:
find a way to reduce this.
Suppose we have five layers, each representing number of
individuals of a different species. To keep it simple, let's assume
individuals of all five species are homogeneous distributed, with
respectively 60, 10, 25, 1 and 4 individuals / raster cell densities.
r.mapcalc "spec1 = 60"
r.mapcalc "spec2 = 10"
r.mapcalc "spec3 = 25"
r.mapcalc "spec4 = 1"
r.mapcalc "spec5 = 4"
Now we can calculate the renyi index for alpha is 0, 1 and 2
(this should be 1.61, 1.06 and 0.83 respectively)
r.series.diversity -r in=spec1,spec2,spec3,spec4,spec5 out=renyi alpha=0,1,2
r.info -r map=renyi_Renyi_0_0
r.info -r map=renyi_Renyi_1_0
r.info -r map=renyi_Renyi_2_0
You can also compute the species richness, shannon, inverse
simpson and gini-simpson indices
r.series.diversity -s -h -p -g in=spec1,spec2,spec3,spec4,spec5 out=biodiversity
The species richness you get should of course be 5. The shannon
index is the same as the renyi index with alpha=1 (1.06). The
inverse simpson and gini-simpson should be 2.3 and 0.57
respectively. Let's check:
r.info -r map=biodiversity_richness
r.info -r map=biodiversity_shannon
r.info -r map=biodiversity_invsimpson
r.info -r map=biodiversity_ginisimpson
- Chase and Knight (2013). "Scale-dependent effect sizes of ecological drivers on biodiversity: why standardised sampling is not enough". Ecology Letters, Volume 16, Issue Supplement s1, pgs 17-26.
- Gini, C. 1912. Variabilità e mutabilità. Reprinted in Memorie di metodologica statistica (Ed. Pizetti E, Salvemini, T). Rome: Libreria Eredi Virgilio Veschi 1.
- Jost L. 2006. Entropy and diversity. Oikos 113:363-75
- Legendre P, Legendre L. 1998. Numerical Ecology. Second English edition. Elsevier, Amsterdam
- Simpson, E. H. 1949. Measurement of Diversity Nature 163
Paulo van Breugel, paulo at ecodiv.org
Last changed: $Date: 2016-01-15 12:15:46 +0100 (Fri, 15 Jan 2016) $
Available at: r.series.diversity source code (history)
Main index |
Raster index |
Topics index |
Keywords index |
Graphical index |
GRASS Development Team,
GRASS GIS 7.4.5svn Reference Manual