MyNixOS website logo
Description

Boltzmann Entropy for Spatial Data.

Calculates several entropy metrics for spatial data inspired by Boltzmann's entropy formula. It includes metrics introduced by Cushman for landscape mosaics (Cushman (2015) <doi:10.1007/s10980-015-0305-2>), and landscape gradients and point patterns (Cushman (2021) <doi:10.3390/e23121616>); by Zhao and Zhang for landscape mosaics (Zhao and Zhang (2019) <doi:10.1007/s10980-019-00876-x>); and by Gao et al. for landscape gradients (Gao et al. (2018) <doi:10.1111/tgis.12315>; Gao and Li (2019) <doi:10.1007/s10980-019-00854-3>).

bespatial

CRANstatus R-CMD-check Lifecycle:experimental Codecov testcoverage

The goal of bespatial is to calculate several entropy metrics for spatial data inspired by Boltzmann’s entropy formula. It includes metrics introduced by Cushman for landscape mosaics (Cushman (2015)), landscape gradients and point patterns (Cushman (2021)); by Zhao and Zhang for landscape mosaics (2019); and by Gao et al. for landscape gradients (2017, 2019).

Installation

You can install the development version from GitHub with:

install.packages("supercells", repos = "https://nowosad.r-universe.dev")

Example

Let’s start by attaching relevant packages and reading example data mosaic. This dataset contains 12 raster layers, where each has an equal number of cells with values 1 and 2 (identical compositions), but they are differently arranged in space (different configurations).

library(terra)
library(bespatial)
mosaic = rast(system.file("raster/mosaic.tif", package = "bespatial"))

Now, we can calculate a selected metric, for example, Cushman’s configurational entropy for landscape mosaics with bes_m_cushman():

ce1 = bes_m_cushman(mosaic, nr_of_permutations = 1000)
plot(mosaic, main = round(ce1$value, 2))

The above results show that the less random the configuration is, the smaller Cushman’s configurational entropy value is.

Functions

Each function in this package has a similar name:

  • it starts with bes_
  • next, it is either m_ for mosaics (categorical rasters), g_ for gradients (g_) (continuous rasters), or p_ for point patterns (rasters with one value and NAs)
  • it ends with the name of the main author of the metric, for example, cushman, zhao, or gao
FunctionDescription
bes_m_cushman()Cushman’s configurational entropy for landscape mosaics (2015)
bes_m_zhao()Zhao’s configurational entropy for landscape mosaics based on the Wasserstein metric (2019)
bes_g_cushman()Cushman’s configurational entropy for surfaces (2021)
bes_g_gao()Boltzmann entropy of a landscape gradient by Gao (2017, 2019)
bes_p_cushman()Cushman’s configurational entropy for point patterns (2021)

References

  • Cushman, S. A. (2015). Calculating the configurational entropy of a landscape mosaic. In Landscape Ecology (Vol. 31, Issue 3, pp. 481–489). Springer Science and Business Media LLC. https://doi.org/10.1007/s10980-015-0305-2
  • Cushman, S. (2018). Calculation of Configurational Entropy in Complex Landscapes. In Entropy (Vol. 20, Issue 4, p. 298). MDPI AG. https://doi.org/10.3390/e20040298
  • Cushman, S. A. (2021). Generalizing Boltzmann Configurational Entropy to Surfaces, Point Patterns and Landscape Mosaics. In Entropy (Vol. 23, Issue 12, p. 1616). MDPI AG. https://doi.org/10.3390/e23121616
  • Gao, Peichao, Hong Zhang, and Zhilin Li. “A hierarchy-based solution to calculate the configurational entropy of landscape gradients.” Landscape Ecology 32(6) (2017): 1133-1146.
  • Gao, Peichao and Zhilin Li. “Aggregation-based method for computing absolute Boltzmann entropy of landscape gradient with full thermodynamic consistency.” Landscape Ecology (2019).
  • Zhao, Y., & Zhang, X. (2019). Calculating spatial configurational entropy of a landscape mosaic based on the Wasserstein metric. Landscape Ecology, 34(8), 1849-1858. https://doi.org/10.1007/s10980-019-00876-x

Contribution

Contributions to this package are welcome - let us know if you have any suggestions or spotted a bug. The preferred method of contribution is through a GitHub pull request. Feel also free to contact us by creating an issue.

Metadata

Version

0.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows