https://github.com/achubaty/grainscape
Efficient Modelling of Landscape Connectivity, Habitat, and Protected Area Networks
https://github.com/achubaty/grainscape
habitat-connectivity landscape-connectivity r r-package spatial-graphs
Last synced: 9 months ago
JSON representation
Efficient Modelling of Landscape Connectivity, Habitat, and Protected Area Networks
- Host: GitHub
- URL: https://github.com/achubaty/grainscape
- Owner: achubaty
- Created: 2016-07-06T15:15:03.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2025-01-22T04:26:13.000Z (over 1 year ago)
- Last Synced: 2025-08-18T04:40:14.745Z (11 months ago)
- Topics: habitat-connectivity, landscape-connectivity, r, r-package, spatial-graphs
- Language: TeX
- Homepage: https://alexchubaty.com/grainscape
- Size: 108 MB
- Stars: 20
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
Awesome Lists containing this project
- open-sustainable-technology - grainscape - Efficient Modelling of Landscape Connectivity, Habitat, and Protected Area Networks. (Biosphere / Conservation and Restoration)
README
# grainscape
[](https://github.com/achubaty/grainscape/actions/workflows/R-CMD-check.yaml)
[](https://cran.r-project.org/package=grainscape)
[](https://zenodo.org/badge/latestdoi/62731055)
[](https://app.codecov.io/gh/achubaty/grainscape?branch=main)

## Efficient Modelling of Landscape Connectivity, Habitat, and Protected Area Networks
Given a landscape resistance surface, creates grains of connectivity and minimum planar graph models that can be used to calculate effective distances for landscape connectivity at multiple scales.
This is a cross-platform reimplementation and update of the `grainscape` package (http://grainscape.r-forge.r-project.org).
To cite `grainscape` in publications, see `citation("grainscape")`.
### Installation
#### From CRAN
```r
install.packages("grainscape")
```
#### From GitHub
1. **Install development libraries:** building packages from source requires the appropriate development libraries for your operating system.
See [here](https://support.posit.co/hc/en-us/articles/200486498-Package-Development-Prerequisites) for more details.
- *Windows:* install [Rtools](https://cran.r-project.org/bin/windows/Rtools/).
- *macOS:* install Xcode commandline tools from the terminal: `xcode-select --install`.
- *Debian/Ubuntu Linux:* ensure `r-base-dev` is installed.
2. **Install from GitHub:**
```r
# install.packages("remotes")
library("remotes")
install_github("achubaty/grainscape")
```
### Reporting bugs
Contact us via the package GitHub site: [https://github.com/achubaty/grainscape/issues](https://github.com/achubaty/grainscape/issues).
### Contributions
This Git repository uses the [Git Flow](https://nvie.com/posts/a-successful-git-branching-model/) branching model (the [`git flow`](https://github.com/petervanderdoes/gitflow-avh) extension is useful for this).
The [`development`](https://github.com/achubaty/grainscape/tree/development) branch contains the latest contributions and other code that will appear in the next release, and the [`main`](https://github.com/achubaty/grainscape) branch contains the code of the latest release, which is exactly what is currently on [CRAN](https://cran.r-project.org/package=grainscape).
To make a contribution to the package, just send a [pull request](https://help.github.com/articles/using-pull-requests/).
When you send your PR, make sure `development` is the destination branch on the [grainscape repository](https://github.com/achubaty/grainscape).
Your PR should pass `R CMD check --as-cran`, which will also be checked by [GitHub Actions](https://github.com/achubaty/grainscape/actions) when the PR is submitted.