## Abstract

The variation of species diversity over space and time has been widely recognised as a key challenge in ecology. However, measuring species diversity over large areas might be difficult for logistic reasons related to both time and cost savings for sampling, as well as accessibility of remote ecosystems. In this paper, we present a new R package - rasterdiv - to calculate diversity indices based on remotely sensed data, by discussing the theory behind the developed algorithms. Obviously, measures of diversity from space should not be viewed as a replacement of in situ data on biological diversity, but they are rather complementary to existing data and approaches. In practice, they integrate available information of Earth surface properties, including aspects of functional (structural, biophysical and biochemical), taxonomic, phylogenetic and genetic diversity. Making use of the rasterdiv package can result useful in making multiple calculations based on reproducible open source algorithms, robustly rooted in Information Theory.

## Introduction

Back in 1872, Ludwig Eduard Boltzmann (Boltzmann 1872) introduced the first measure of entropy, later called marginal entropy and restructured by Claude Elwood Shannon under a mathematical theory umbrella (Shannon 1948). As such, it became one of the cornerstones of ecological theory and was adopted widely in ecological practice for measuring biodiversity and its change. Concerning biological entropy, the variation of species diversity over space and time has been widely recognised as a key challenge in ecology and was associated with analytic geometric models focusing either on the spatial component of species dispersal (Palmer 2007; Gorelick 2008) or on environmental drivers (Kreft and Jetz 2007).

To address this issue, many spatio-statistical models have been proposed to model biological entropy using data from ecological surveys (Bachl et al. 2019). However, the statistical clarity (sensu Dushoff et al. 2019) of such models strictly depends on a high in situ data uncertainty, which propagates through all inferential steps (Meyer et al. 2016; Rocchini et al. 2019). Furthermore, measuring species diversity over wide areas might be difficult for logistic reasons related both to time and sampling costs (Chiarucci et al. 2011; Hernandez-Stefanoni et al. 2012) and to theoretical and practical constraints, which are mainly related to two sources of uncertainty. The first is the uncertainty associated with the detectability and the determination of individual plants or animals species. The second is the one linked to different sampling strategies (McGlinn and Palmer 2009) or efforts (Rocchini et al. 2019) per area, or, in the worst case, to the impossibility of getting information about the real grain (sensu Scheiner et al. 2000) sampled (Hobohm 2003). In the absence of such information, it becomes excessively challenging to properly address the modifiable areal unit problem (MAUP), which in this case is the sensitivity of biodiversity to scale (Jelinski and Wu 1996). This is true, even though evidence exists for a chance to rely, in some instances, on expert knowledge to build straightforward and robust diversity maps worldwide (Hobohm et al. 2019).

Accordingly, algorithms based on remote sensing and spatial ecology might help estimating the variation of biodiversity over space and time (Skidmore et al. 2011; Schimel and Scheiner 2019) and represent a powerful first exploratory tool to detect the spatial variability across the landscape. The relationship between ecological processes (and functions) and the remotely sensed diversity can rely on the definition of niche proposed by Kroes (1977), and according to which a niche is the biotic structural and functional part of the ecosystem. Strictly speaking, such definition can be profitably used to measure spatial heterogeneity in ecosystems in order to convey information on their potential functions (Schneider et al. 2017).

From this point of view, the development of Free and Open Source algorithms to measure diversity from space would be beneficial to allow high robustness and reproducibility of the proposed approaches (Rocchini and Neteler 2012). Furthermore, their intrinsic transparency, community-vetoing options, sharing and rapid availability are also valuable additions and reasons to move to open source options. Among the different open source packages, the R software environment is certainly one of the most widespread worldwide and different packages have been devoted to remote sensing for: (i) raster data management (raster package, Hijmans and van Etten 2020), (ii) remote sensing data analysis (RStoolbox package, Leutner et al. 2019), (iii) spectral species diversity (biodivMapR package, Féret and Boissieu 2020), (iv) sparse generalised dissimilarity modelling based on remote sensing data (sgdm package, Leitao et al. 2012), (v) entropy-based local spatial association (ELSA package, Naimi et al. 2019), (vi) landscape metrics calculation (landscapemetrics package, Hesselbarth et al. 2019), to name just a few. Reader can also refer to https://cran.r-project.org/web/views/Spatial.html for the CRAN Task View on analysis of spatial data.

However, currently no package provides a flow of functions grounded on Information Theory related to abundance based measures, by further introducing distances and going back to Information Theory again by generalised entropy. In this paper, we introduce a new R package which provides such a functions’ throughput workflow. The aim of this manuscript is to encompass the theory behind the algorithms developed in the rasterdiv package (https://CRAN.R-project.org/package=rasterdiv), relying on the definition given by Gorelick (2011b):

Theory is neither mathematical nor abstract. Theory is the creative, inductive, and synthetic discipline of forming hypothesis [...]

## Information theory

One of the mostly used metrics for measuring remotely sensed diversity is related to the entropy measurement firstly introduced by Shannon (Shannon 1948).

Given a sample area with *N* pixel values and \(p_i\) relative abundances for every \(i\in \{1,\dots ,N\}\), in decreasing order, the Shannon index is calculated as:

Taking into account only the most abundant pixel value, the Berger-Parker (Berger and Parker 1970) index is given by:

In remote sensing applications, the derivation of synthetic indices of any sort (i.e. diversity) is often performed by sequentially considering only small chunks of the whole image. These chunks are commonly defined as ’kernel’, ’windows’ or ’moving windows’. From now on, we will use this terminology to indicate the local space of analysis.

Given an x integer matrix (or RasterLayer) which in R could be defined as:

Both indices can be calculated using rasterdiv by a moving window and applying the commands Shannon and BergerParker.

where window represents the side of the moving window. Additional arguments common to all functions in the package are: na.tolerance that determines the proportion of NA values allowed in a moving window (default equals 1), np which sets the number of processes in the parallel computing environment defined with cluster.type (default is “SOCK”).

Both indices obey to the relative abundance of values. The Berger-Parker index is equal to the relative proportion of the most abundant class in a moving window (Fig. 1). Hence, low values of Berger-Parker are expected for continuous satellite data, given the high variability of reflectance values. In contrast, in the Shannon index, the abundance of every single numerical category (pixel value) is taken into account. This might lead to taking into account the turnover among values, since the higher the turnover the lower the dominance of a single class (Fig. 2). However, Shannon’s *H* is unable to discern situations where there is a high richness (number of numerical categories) and a low evenness from those where there is a low richness but a high evenness.

To better account for evenness, the Pielou index (Pielou 1966) can be calculated by simply standardising the Shannon index on the maximum possible Shannon index attainable given the same richness value. The latter is attained when the maximum potential evenness of pixel values/numerical categories is reached, i.e. when they are equally distributed over space.

\(H_{max}\) corresponds to the natural logarithm of the number of pixel values.

Using rasterdiv, the Pielou index can simply be calculated as:

Figure 3 reports an example with a moving window of 9x9 pixels.

## Solving the non-dimensionality of Shannon’s \(H'\): the Rao’s Q diversity index

Both Shannon’s *H* and Pielou’s *E* are dimensionless. In other words, they consider differences in the relative abundance among pixel values, but not their relative spectral distance, i.e. the distance among spectral values. For instance, let \(A = (1,2,3,4,5,6,7,8,9)\) and \(B = (1,10^2,10^3,10^4,10^5,10^6,10^7, 10^8,10^9)\) be two theoretical arrays of values. In both cases, values are different from each other; hence, despite their relative numerical distance the Shannon index will always be maximum, i.e. \(H=\text{In} (9)=2.197225\) reducing \(E=H/H_{max}=1\).

In remotely sensed imagery, this is a crucial point since it might happen that contiguous zones could have similar (but not equal) reflectance values. For instance, the diversity of a homogeneous surface like water could be overestimated if spectral distances are not considered.

To overcome this issue, the Rao’s Quadratic diversity (hereafter Rao’s Q, Rao 1982) could be applied by not only taking into account relative abundance but also the spectral distance among different pixel values.

Given the values of different pixels *i* and *j*, the Rao’s Q consider their pairwise distance \(d_{ij}\) as:

Hence, an array with different but spectrally close values will lead to a high Shannon’s H but a low Rao’s Q. On the contrary, an array with different and distant values in the spectral space will lead to both a high Shannon’s H and a high Raos’ Q (Rao 1982).

Moving towards a 2D spatial extent, let M be a 2D matrix \(M=\begin{pmatrix} \lambda _{1} &{} \lambda _{2} &{} \lambda _{3} \\ \lambda _{4} &{} \lambda _{5} &{} \lambda _{6} \\ \lambda _{7} &{} \lambda _{8} &{} \lambda _{9} \end{pmatrix}\) formed by pixels with a certain reflectance value \(\lambda\) in a single band for instance. For simplicity, let us consider an 8-bit band, i.e. containing 256 possible values (see also Rocchini et al. 2017). As a consequence, deriving Rao’s Q involves calculating a distance matrix \(M_d\) for all the pixel values:

Thus, according to Eq. 4, Rao’s Q is related to the sum of all the pixel values pairwise distances, each of which is multiplied by the relative abundance of each pair of pixels in the analysed image \(d \times (1/N^2)\). In other words, Rao’s Q is the expected difference in reflectance values between two pixels drawn randomly with replacement from the evaluated set of pixels. The distance matrix can be built in several dimensions (layers), thus allowing to consider more than one band at a time. As a consequence, Rao’s Q can be calculated in a multidimensional (multi-layers) system.

In rasterdiv package Rao’s Q is calculated as:

The dist_m argument refers to the type of distance calculated among pixels and can be any distance available in the R package proxy, such as Euclidean, Manhattan or Canberra distance. The Euclidean distance is the only possible with unidimensional datasets (mode=”classic“) (Fig. 4) as it is demonstrated that in one dimension \(D_M:(x,y)\mapsto \sum {|x_i - y_i|}\)=\(D_E:(x,y)\mapsto \sqrt{\sum {(x_i - y_i)^2}}\), where \(D_M\) and \(D_E\) are the Manhattan and the Euclidean distances, respectively. In a similar way, the Canberra distance is derived from the Manhattan distance by standardising separately the absolute differences of each band with the sum of both values, and thus will also equal \(D_E\) in one dimension, such that: \(D_C:(x,y)\mapsto \sum {\dfrac{|x_i - y_i|}{|x_i|+|y_i|}}\)=\(D_E:(x,y)\mapsto \sqrt{\sum {(x_i - y_i)^2}}\).

## Solving the intrinsic continuity of spectral data: cumulative residual entropy

As previously stated, spectral data are continuous variables that are approximate to discrete (the so called “digital number”) for practical reasons. As such, the fact that two different pixels should be counted or not in a category depends from the whim of the normalisation of the signal when Digital Numbers (DNs) are generated. Shannon index is built strictly for a non-ordered finite set of categories. For continuous variables, a derivative version of Shannon index was proposed, but soon it was clear that it had very different properties than categorical formulation (Jumarie 1990; Michalowicz et al. 2013). Rao et al. (2004) proposed a Cumulative Residual Entropy (CRE) to build a consistent Shannon-like index for continuous variables. It is based on residual cumulative probability (\(P(X>=x_i)\)), which can be estimated in a robust manner from empirical mono-dimensional distributions by counting for each value the number of observations with equal or larger values and then dividing by the total. CRE is defined as follows:

and to estimate it from an empirical distribution, the following approach is advised:

where *X* is the sorted vector of *N* observations. In practice, the approach is similar to the Rao’s Q, given that a coefficient *d*, representing the disparity of the observations, is used to weight the diversity estimate based on probability. The difference resides in that the disparity in this continuous measure is absolute, while in Rao’Q it is relative between two observations.

This difference makes more complex the generalisation to a multi-layer, where this time the unidimensional cumulative residual probability is substituted with a multivariate one. For instance, here is an example making use of three layers / bands:

The calculation of the cumulative residual probability \(P_{cr}(X,Y,Z)\) in an efficient way is based on: (i) calculating a contingency array with a certain dimension for each band, and then (ii) performing a reverse cumulative sum along each dimension as follows:

In rasterdiv Cumulative Residual Entropy can be calculated as:

producing a map such as that achieved in Fig. 5.

## Solving point descriptors of diversity: the Rényi and Hill generalised entropy

The metrics described above represent point descriptors of diversity, each of which is able to represent only a part of the whole diversity spectrum that can be attained. There is actually no single measure that could be adopted to represent all the different aspects of diversity with an intrinsic fallacy in considering a ‘true’ diversity (Gorelick 2011a).

Rényi (1970) firstly proposed a measure which is able to represent several diversity metrics in just one formula, by only changing one parameter (\(\alpha\) in the original version of his manuscript). Given a sample area with *N* pixel values and \(p_i\) relative abundances for every \(i\in \{1,\dots ,N\}\), the Rényi index is:

Changing the parameter \(\alpha\) will lead to different indices starting from the same formula (Hill 1973). As an example, when \(\alpha\)=0, \(H_0=\ln (N)\) where *N*=richness, namely the maximum possible Shannon index (\(H_{max}\)). In practice, with \(\alpha =0\), all the spectral values equally contribute to the index, without making use of their relative abundance. For \(\alpha \rightarrow 1\), the Rényi will equal Shannon *H*, according to the l’Hospital’s rule, while for \(\alpha\)=2 the Rényi index will equal the ln(1/*D*) where *D* is the Simpson’s dominance (Simpson 1949). The theoretical curve relating the Rényi index and \(\alpha\) is a negative exponential, i.e. it decays until flattening for higher values of \(\alpha\), where the weight of the most abundant spectral values is higher with small differences among the attained diversity maps (Ricotta et al. 2003a).

In rasterdiv the Rényi index is calculated as:

where x and window are the input dataset and the moving window size, as in previous functions (Fig. 6). The argument alpha (\(\alpha\) value in Eq. 10, default equals 1) can be a single integer, a vector (e.g. alpha=c(1,3)) or a sequence of integers (e.g. alpha=1:3).

Hill (1973) was the first ecologist applying the generalised entropy concept initially developed by Rényi (1970). In particular, since no particular formula would have a preeminent advantage over the others (Hill 1973), the Hill’s generalised entropy \(N_\alpha\) was based on the effective number of species of \(H_\alpha\), namely the number of species that would lead to \(H_\alpha\) if they were equally abundant. In our case, the “species concept” is translated to the “spectral values” concept. Hence, \(N_\alpha\) is the effective number of spectral values that would give \(H_\alpha\) as an output. \(N_\alpha\) can thus be calculated as:

As for the Rényi generalised entropy, changing \(\alpha\) will let the index transform in many other widely used indices, which are point descriptions of diversity, i.e. peculiar cases of the Hill’s generalised theory. Hence, for \(\alpha = 0\), \(N_0 = N\), where *N* is the total number of spectral values in the window of analysis; for \(\alpha = 1\), \(N_1\) = exp *H*; for \(\alpha = 2\), \(N_2 = 1/S\), where *S* is the Simpson’s index, and for \(\alpha = \infty\), \(N_{\infty } = {1 \over I_{BP}}\), where \(I_{BP}\) is the Berger-Parker index (Fig. 7). We refer to Ricotta et al. (2003a) and Ricotta et al. (2003b) for a concise review on the theoretical properties of the Rényi and the Hill’s generalised entropy, respectively. In rasterdiv, the Hill’s generalised entropy can be calculated as:

We refer to Chao et al. (2016) for a complete overview of the Hill’s numbers application in ecology.

## Discussion

In this paper, we provided a full description of the main functionalities of the new R package rasterdiv. The rasterdiv package provides an unprecedented suite of functions to calculate different indices for estimating diversity from space and to perform a first exploration of potential biodiversity hotspots worldwide at a glance. Of course, measures of diversity from space should not be viewed as a replacement of in situ data on biological diversity, but they are rather complementary to existing data and approaches. In practice, they integrate available information of Earth surface properties, including aspects of functional (structural, biophysical and biochemical), taxonomic, phylogenetic and genetic diversity (Laliberté et al. 2019).

Obviously, in most of the Information Theory based metrics, only one layer can be used, considering those indices related to relative abundance, apart from the Rao’s Q and the Cumulative Residual Entropy (CRE). In the Rao’s Q index, multidimensional systems can be used to calculate spectral distance (see also Nakamura et al. (2020) on the dimensionality of diversity), while in the CRE it is possible to calculate a multidimensional cumulative distribution to be used in the estimates (Drissi et al. 2008). In general, remotely sensed data are actually the approximation of more complex systems, which depends on the original radiometric and spectral resolution. In ecological terms, such original spectral space formed by many bands is analogous to the Hutchinson’s hypervolume, in which a geometrical order is given to those variables shaping species’ niches (Hutchinson 1959; Blonder 2018). In this case, the spectral space is expected to be related to both species niches and their relative diversity. The use of such spaces is an efficient approach to figure out the diversity of an area and potentially guide field sampling and monitoring schemes (Rocchini et al. 2008, 2018).

Concerning the data being used, spectral diversity measures computed from satellite images represent a valid alternative to class-based land cover maps for investigating landscapes heterogeneity (Rocchini et al. 2014). For instance, a highly fragmented landscape characterised by a mosaic of crops and seminatural forests suffers from oversimplification when investigated through land cover classes (Amici et al. 2018), while it should present higher spectral diversity values compared to more homogeneous landscapes within the same study area (Rocchini and Ricotta 2007). Several studies have already acknowledged the importance of computing continuous spectral diversity measures from spectral bands in order to better understand and discriminate the various landscape components (Karlson et al. 2015; Godinho et al. 2018; Ribeiro et al. 2019; Doxa et al. 2020). This said, caution is warranted when making use of continuous data, by seriously considering the radiometry of pixel values. As an example, relying on continuous NDVI (Normalised Difference Vegetation Index) values, ranging from −1 to 1 with float (decimal) precision data, will lead to a high neighbouring diversity which could actually be the effect of data binning rather than of a biological underlying pattern. In general, an 8-bit image with a range of integer values/classes from 0 to 255 would be preferable. In this paper, we made use of an 8-bit NDVI layer rescaled from Copernicus data. However, a multispectral system reduced to one single layer through the first component of a Principal Component Analysis, or similar multidimensionality reduction techniques, would also be useful (Féret and Boissieu 2020). In fact, NDVI assumes a biomass-grounded reflectance model, while the direct use of the original spectral data (digital numbers) does not generally require any assumptions about the biology of objects being sensed.

As remotely sensed estimates of diversity are currently based on relatively long time series, they might allow a more general forecasting framework of future shifts in rates of diversity change. This is particularly important when aiming at finding potential indicators of diversity change in time (Schmeller et al. 2018). On this point, it has been widely demonstrated that remotely sensed diversity might be in line with most of the spatially constrained Essential Biodiversity Variables proposed by Skidmore et al. (2015).

The rasterdiv package might also be particularly useful when aiming at calculating diversity directly from climate data, derived from remote sensing (Metz et al. 2014). This could allow analysing diversity based on the main drivers of biological diversity in the field, rather than on the patterns resulting from pure spectral response. This is true when considering both wide climatic variations at global scale and microclimate variations at the scale of individuals (Zellweger et al. 2019). Due to unprecedented rates of climatic changes, the adaptation of species to climate change is a benchmark in ecology. Hence, estimating diversity from climate gridded data could improve our understanding of the variability of species ranges at different spatial and temporal scales (Senner et al. 2018).

## Conclusion

Measuring diversity from above and delivering rapid and robust knowledge about diversity over wide regions could be of crucial importance for guiding management practices. From this point of view, the spatial variation of the spectral signal has an intrinsic cumbersome relation with the spatial autocorrelation (sensu Laliberté (2008)) of pixel values over space (and time, e.g. Rocchini et al. (2019)), which renders the proposed rasterdiv package a powerful tool to monitor the variation of ecosystems properties over space and time, and thus their change (Rocchini et al. 2018).

As previously stated, no single measure provides a full description of all the different aspects of diversity. That is why, the rasterdiv package can result useful in making multiple calculations based on reproducible open source algorithms, robustly rooted on Information Theory from which the different indices are extracted.

## References

Amici, V., Filibeck, G., Rocchini, D., Geri, F., Landi, S., Giorgini, D., et al. (2018). Are CORINE land cover classes reliable proxies of plant species assemblages? A test in Mediterranean forest landscapes.

*Plant Biosystems,**152,*994–1001.Bachl, F. E., Lindgren, F., Borchers, D. L., & Illian, J. B. (2019). inlabru: an R package for Bayesian spatial modelling from ecological survey data.

*Methods in Ecology and Evolution,**10,*760–766.Berger, W. H., & Parker, F. L. (1970). Diversity of planktonic foraminifera in deep-sea sediments.

*Science,**168,*1345–1347.Blonder, B. (2018). Hypervolume concepts in niche and trait based ecology.

*Ecography,**41,*1441–1455.Boltzmann, L. E. (1872). Weitere studien über das waärmegleichgewicht unter gasmolekälen.

*S. K. Akad. Wiss. Wein,**66,*275–370.Chao, A., Chiu, C.-H., & Jost, L. (2016). Phylogenetic diversity measures and their decomposition: A framework based on hill numbers. In R. Pellens & P. Grandcolas (Eds.),

*Biodiversity conservation and phylogenetic systematics - preserving our evolutionary heritage in an extinction crisis*. Basel: Springer.Chiarucci, A., Bacaro, G., & Scheiner, S. M. (2011). Old and new challenges in using species diversity for assessing biodiversity.

*Philosophical Transactions of the Royal Society of London Series B,**366,*2426–2437.Doxa, A., & Prastacos, P. (2020). Using Rao’s quadratic entropy to define environmental heterogeneity priority areas in the European Mediterranean biome.

*Biological Conservation,**241,*108366.Drissi, N., Chonavel, T., & Boucher, J. M. (2008). Generalized cumulative residual entropy for distributions with unrestricted supports.

*Research Letters in Signal Processing,**2008,*1–5.Dushoff, J., Kain, M. P., & Bolker, B. M. (2019). I can see clearly now: Reinterpreting statistical significance.

*Methods in Ecology and Evolution,**10,*756–759.Féret, J.-B., & de Boissieu, F. (2020). biodivMapR: An R package for \(\alpha\)-and \(\beta\)-diversity mapping using remotely sensed images.

*Methods in Ecology and Evolution,**11,*64–70.Godinho, S., Guiomar, N., & Gil, A. (2018). Estimating tree canopy cover percentage in a Mediterranean silvopastoral systems using Sentinel-2A imagery and the stochastic gradient boosting algorithm.

*International Journal of Remote Sensing,**39,*4640–4662.Gorelick, R. (2008). Species richness and the analytic geometry of latitudinal and altitudinal gradients.

*Acta Biotheoretica,**56,*197–203.Gorelick, R. (2011a). Do we have a consistent terminology for species diversity? The fallacy of true diversity.

*Oecologia,**167,*885–888.Gorelick, R. (2011b). What is theory?

*Ideas in Ecology and Evolution,**4,*1–10.Hernandez-Stefanoni, J. L., Gallardo-Cruz, J. A., Meave, J. A., Rocchini, D., Bello-Pineda, J., & Lopez-Martinez, J. O. (2012). Modeling alpha- and beta-diversity in a tropical forest from remotely sensed and spatial data.

*International Journal of Applied Earth Observation and Geoinformation,**19,*359–368.Hesselbarth, M. H. K., Sciaini, M., With, K. A., Wiegand, K., & Nowosad, J. (2019). landscapemetrics: An open source R tool to calculate landscape metrics.

*Ecography,**42,*1648–1657.Hill, M. O. (1973). Diversity and evenness: A unifying notation and its consequences.

*Ecology,**54,*427–431.Hijmans, R.J., van Etten, J. (2020). raster: Geographic analysis and modeling with raster data. R package version 3.0-12. http://CRAN.R-project.org/package=raster

Hobohm, C. (2003). Characterization and ranking of biodiversity hotspots: Centres of species richness and endemism.

*Biodiversity and Conservation,**12,*279–287.Hobohm, C., Janisova, M., Steinbauer, M., Landi, S., Field, R., Vanderplank, S., et al. (2019). Global endemics-area relationships of vascular plants.

*Perspectives in Ecology and Conservation,**17,*41–49.Hutchinson, G. (1959). Homage to Santa Rosalia or why are there so many kinds of animals?

*American Naturalist,**93,*145–159.Jelinski, D. E., & Wu, J. (1996). The modifiable areal unit problem and implications for landscape ecology.

*Landscape Ecology,**11,*129–140.Jumarie, G. (1990).

*Relative information*. Berlin: Springer.Karlson, M., Ostwald, M., Reese, H., Sanou, J., Tankoano, B., & Mattsson, E. (2015). Mapping tree canopy cover and aboveground biomass in Sudano-Sahelian woodlands using Landsat 8 and Random Forest.

*Remote Sensing,**7,*10017–10041.Kreft, H., & Jetz, W. (2007). Global patterns and determinants of vascular plant diversity.

*Proceedings of the National Academy of Sciences,**104,*5925–5930.Kroes, H. W. (1977). The niche structure of ecosystems.

*Journal of Theoretical Biology,**65,*317–326.Laliberté, E., Schweiger, A. K., & Legendre, P. (2019). Partitioning plant spectral diversity into alpha and beta components.

*Ecology Letters,**23,*370–380.Laliberté, E. (2008). Analyzing or explaining beta diversity? Comment.

*Ecology,**89,*3232–3237.Leitao, P. J., Schwieder, M., & Senf, C. (2017). sgdm: An R package for performing sparse generalized dissimilarity modelling with tools for gdm.

*ISPRS International Journal of Geo-Information,**6,*23.Leutner, B., Horning, N., Schwalb-Willmann, J., Hijmans, R.J. (209). RStoolbox: Tools for remote sensing data analysis. R package version 0.2.6. http://CRAN.R-project.org/package=RStoolbox

McGlinn, D. J., & Palmer, M. W. (2009). Modeling the sampling effect in the species-time-area relationship.

*Ecology,**90,*836–846.Meyer, C., Weigelt, P., & Kreft, H. (2016). Multidimensional biases, gaps and uncertainties in global plant occurrence information.

*Ecology Letters,**19,*992–1006.Metz, M., Rocchini, D., & Neteler, M. (2014). Surface temperatures at the continental scale: Tracking changes with remote sensing at unprecedented detail.

*Remote Sensing,**6,*3822–3840.Michalowicz, J. V., Nichols, J. M., & Bucholtz, F. (2013).

*Handbook of differential entropy*. London: Chapman and Hall/CRC.Nakamura, G., Gonçalves, L. O., & Duarte, L. D. S. (2020). Revisiting the dimensionality of biological diversity.

*Ecography,**43,*539–548. https://doi.org/10.1111/ecog.04574.Naimi, B., Hamm, N. A. S., Groen, T. A., Skidmore, A. K., Toxopeus, A. G., & Alibakhshi, S. (2019). ELSA: Entropy-based local indicator of spatial association.

*Spatial Statistics,**29,*66–88.Palmer, M. W. (2007). Species-area curves and the geometry of nature. In D. Storch, P. Marquet, & J. Brown (Eds.),

*Scaling biodiversity*. Cambridge: Cambridge University Press.Pielou, E. C. (1966). The measurement of diversity in different types of biological collections.

*Journal of Theoretical Biology,**13,*131–144.Rao, C. R. (1982). Diversity and dissimilarity coefficients: A unified approach.

*Theoretical Population Biology,**21,*24–43.Rao, M., Chen, Y., Vemuri, B. C., & Wang, F. (2004). Cumulative residual entropy: A new measure of information.

*IEEE Transactions in Information Theory,**50,*1220–1228.Rényi, A. (1970).

*Probability theory*. Amsterdam: North Holland Publishing Company.Ribeiro, I., Proenca, V., Serra, P., Palma, J., Domingo-Marimon, C., Pons, X., & Domingos, T. (2019). Remotely sensed indicators and open-access biodiversity data to assess bird diversity patterns in Mediterranean rural landscapes.

*Scientific Reports,**9,*1–13.Ricotta, C., Corona, P., Marchetti, M., Chirici, G., & Innamorati, S. (2003a). LaDy: Software for assessing local landscape diversity profiles of raster land cover maps using geographic windows.

*Environmental Modelling & Software,**18,*373–378.Ricotta, C., & Avena, G. (2003b). On the relationship between Pielou’s evenness and landscape dominance within the context of Hill’s diversity profiles.

*Ecological Indicators,**2,*361–365.Rocchini, D., Dadalt, L., Delucchi, L., Neteler, M., & Palmer, M. W. (2014). Disentangling the role of remotely sensed spectral heterogeneity as a proxy for North American plant species richness.

*Community Ecology,**15,*37–43.Rocchini, D., Luque, S., Pettorelli, N., Bastin, L., Doktor, D., Faedi, N., et al. (2018). Measuring \(\beta\)-diversity by remote sensing: A challenge for biodiversity monitoring.

*Methods in Ecology and Evolution,**9,*1787–1798.Rocchini, D., Marcantonio, M., Arhonditsis, G., Lo Cacciato, A., Hauffe, H. C., & He, K. S. (2019). Cartogramming uncertainty in species distribution models: A Bayesian approach.

*Ecological Complexity,**38,*146–155.Rocchini, D., Marcantonio, M., Da Re, D., Chirici, G., Galluzzi, M., Lenoir, J., et al. (2019). Time-lapsing biodiversity: An open source method for measuring diversity changes by remote sensing.

*Remote Sensing of Environment,**231,*111192.Rocchini, D., Marcantonio, M., & Ricotta, C. (2017). Measuring Rao’s Q diversity index from remote sensing: An open source solution.

*Ecological Indicators,**72,*234–238.Rocchini, D., & Neteler, M. (2012). Let the four freedoms paradigm apply to ecology.

*Trends in Ecology & Evolution,**27,*310–311.Rocchini, D., & Ricotta, C. (2007). Are landscapes as crisp as we may think?

*Ecological Modelling,**204,*535–539.Rocchini, D., Wohlgemuth, T., Ghisleni, S., & Chiarucci, A. (2008). Spectral rarefaction: Linking ecological variability and plant species diversity.

*Community Ecology,**9,*169–176.Schmeller, D., Weatherdon, L., Loyau, A., Bondeau, A., Brotons, L., Brummitt, N., et al. (2018). A suite of essential biodiversity variables for detecting critical biodiversity change.

*Biological Reviews,**93,*55–71.Scheiner, S. M., Cox, S. B., Willig, M., Mittelbach, G. G., Osenberg, C., & Kaspari, M. (2000). Species richness, species-area curves and Simpson’s paradox.

*Evolutionary Ecology Research,**2,*791–802.Schneider, F. D., Morsdorf, F., Schmid, B., Petchey, O. L., Hueni, A., Schimel, D. S., & Schaepman, M. E. (2017). Mapping functional diversity from remotely sensed morphological and physiological forest traits.

*Nature Communications,**8,*1441.Schimel, D., & Schneider, F. D. (2019). Flux towers in the sky: Global ecology from space.

*New Phytologist,**224,*570–584.Senner, N. R., Stager, M., & Cheviron, Z. A. (2018). Spatial and temporal heterogeneity in climate change limits species’ dispersal capabilities and adaptive potential.

*Ecography,**41,*1428–1440.Shannon, C. E. (1948). A mathematical theory of communication.

*Bell System Technical Journal,**27*(379–423), 623–656.Skidmore, A. K., Pettorelli, N., Coops, N. C., Geller, G. N., Hansen, M., Lucas, R., et al. (2015). Agree on biodiversity metrics to track from space.

*Nature,**523,*403–405.Skidmore, A. K., Franklin, J., Dawsonc, T. P., & Pilesjo, P. (2011). Geospatial tools address emerging issues in spatial ecology: A review and commentary on the Special Issue.

*International Journal of Geographical Information Science,**25,*337–365.Simpson, E. H. (1949). Measurement of diversity.

*Nature,**163,*688.Zellweger, F., De Frenne, P., Lenoir, J., Rocchini, D., & Coomes, D. (2019). Advances in microclimate ecology arising from remote sensing.

*Trends in Ecology & Evolution,**34,*327–341.

## Acknowledgements

GB was supported by Friuli Venezia Giulia Region Operative Program, Europen Social Fund – 2014/2020 Program, Specific Action n. 53/16: Integrative professional training courses within degree programs. SV was partially supported by the European H2020 ESHAPE (grant agreement 820852). DR was partially supported by the H2020 Project SHOWCASE (Grant agreement No862480) and by the H2020 COST Action CA17134 ‘Optical synergies for spatiotemporal sensing of scalable ecophysiological traits (SENSECO)’.

## Funding

Open access funding provided by Alma Mater Studiorum - Universitá di Bologna within the CRUI-CARE Agreement.

## Author information

### Authors and Affiliations

### Corresponding author

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Thouverai, E., Marcantonio, M., Bacaro, G. *et al.* Measuring diversity from space: a global view of the free and open source **rasterdiv** R package under a coding perspective.
*COMMUNITY ECOLOGY* **22**, 1–11 (2021). https://doi.org/10.1007/s42974-021-00042-x

Received:

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s42974-021-00042-x

### Keywords

- Biodiversity
- Ecological informatics
- Modelling
- Remote sensing
- Satellite imagery