belg

Boltzmann entropy of a landscape gradient

https://github.com/r-spatialecology/belg

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.6%) to scientific vocabulary

Keywords

entropy landscape r raster spatial
Last synced: 6 months ago · JSON representation

Repository

Boltzmann entropy of a landscape gradient

Basic Info
Statistics
  • Stars: 19
  • Watchers: 2
  • Forks: 5
  • Open Issues: 1
  • Releases: 0
Topics
entropy landscape r raster spatial
Created almost 8 years ago · Last pushed about 3 years ago
Metadata Files
Readme License

README.Rmd

---
output: github_document
---



```{r setup, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```
# belg


[![CRAN status](http://www.r-pkg.org/badges/version/belg)](https://cran.r-project.org/package=belg)
[![R build status](https://github.com/r-spatialecology/belg/workflows/pkgdown-and-test-coverage/badge.svg)](https://github.com/r-spatialecology/belg/actions)
[![codecov](https://app.codecov.io/gh/r-spatialecology/belg/branch/master/graph/badge.svg)](https://app.codecov.io/gh/r-spatialecology/belg)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/belg)](https://cran.r-project.org/package=belg)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1209419.svg)](https://doi.org/10.5281/zenodo.1209419)

  
Boltzmann entropy (also called configurational entropy) has been recently adopted to analyze entropy of landscape gradients (Gao et al. (2017, 2018, 2019)).
The goal of **belg** is to provide an efficient C++ implementation of this method in R.
It also extend the original idea by allowing calculations on data with missing values (Nowosad and Gao (2020)).

## Installation

You can install the released version of belg from [CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("belg")
```

And the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("r-spatialecology/belg")
```

## Examples

As an example, we use two rasters - `land_gradient1` representing a complex landscape and `land_gradient2` representing a simple landscape:

```{r, message=FALSE, fig.height=3}
library(raster)
library(belg)
land_gradient1 = raster(system.file("raster/land_gradient1.tif", package = "belg"))
land_gradient2 = raster(system.file("raster/land_gradient2.tif", package = "belg"))
plot(stack(land_gradient1, land_gradient2))
```

The main function in this package, `get_boltzmann()`, calculates the Boltzmann entropy of a landscape gradient:

```{r}
get_boltzmann(land_gradient1)
get_boltzmann(land_gradient2)
```

This function accepts a `SpatRaster`, `stars`, `RasterLayer`, `RasterStack`, `RasterBrick`, `matrix`, or `array` object as an input.
It allows for calculation of the relative (the `relative` argument equal to `TRUE`) and absolute Boltzmann entropy of a landscape gradient.
As a default, it uses a logarithm of base 10 (`log10`), however `log` and `log2` are also available options for the `base` argument.

```{r}
get_boltzmann(land_gradient1, base = "log")
get_boltzmann(land_gradient1, relative = TRUE)
get_boltzmann(land_gradient1, base = "log2", relative = TRUE)
```

Two methods of calculating the Boltzmann entropy of a landscape gradient are available: `"hierarchy"` (default) for the hierarchy-based method (Gao et al., 2017) or `"aggregation"` for the aggregation-based method (Gao et al., 2019).
The aggregation-based method requires that the number of rows and columns in the input data must be a multiple of 2.

```{r}
get_boltzmann(land_gradient1, method = "aggregation")
get_boltzmann(land_gradient1, relative = TRUE, method = "aggregation")
```

More examples can be find at https://github.com/Nowosad/belg-examples.

## References

- 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, Hong Zhang, and Zhilin Li. "An efficient analytical method for computing the Boltzmann entropy of a landscape gradient." Transactions in GIS (2018).
- Gao, Peichao and Zhilin Li. "Aggregation-based method for computing absolute Boltzmann entropy of landscape gradient with full thermodynamic consistency." Landscape Ecology (2019).
- Nowosad, J.; Gao, P. belg: A Tool for Calculating Boltzmann Entropy of Landscape Gradients. Entropy 2020, 22, 937. https://doi.org/10.3390/e22090937

Owner

  • Name: r-spatialecology
  • Login: r-spatialecology
  • Kind: organization

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 178
  • Total Committers: 1
  • Avg Commits per committer: 178.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Nowosad t****i@g****m 178

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 14
  • Total pull requests: 4
  • Average time to close issues: 4 months
  • Average time to close pull requests: 3 days
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 1.64
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Nowosad (10)
  • dylanbeaudette (2)
  • rsbivand (2)
Pull Request Authors
  • Nowosad (4)
Top Labels
Issue Labels
question (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 348 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 12
  • Total maintainers: 1
cran.r-project.org: belg

Boltzmann Entropy of a Landscape Gradient

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 348 Last month
Rankings
Forks count: 10.8%
Stargazers count: 13.3%
Average: 21.8%
Dependent repos count: 23.9%
Dependent packages count: 28.7%
Downloads: 32.3%
Maintainers (1)
Last synced: 7 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.3.0 depends
  • Rcpp * imports
  • covr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • raster * suggests
  • rasterVis * suggests
  • rgdal * suggests
  • rmarkdown * suggests
  • sp * suggests
  • stars * suggests
  • terra * suggests
  • testthat * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite