Home

Awesome

<!-- badges: start -->

R-CMD-check codecov lifecycle CRAN
status DOI:10.1111/2041-210X.13076

<!-- badges: end -->

landscapetools

landscapetools provides utility functions for some of the less-glamorous tasks involved in landscape analysis:

Utilities:

Visualization

Themes:

Installation

You can install the released version from CRAN with:

install.packages("landscapetools")

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ropensci/landscapetools")

Utilities

Classify

# Classify the landscape into land uses
classified_landscape <- util_classify(fractal_landscape,
                                      n = 3,
                                      level_names = c("Land Use 1", 
                                                      "Land Use 2",
                                                      "Land Use 3"))

show_landscape(classified_landscape, discrete = TRUE)
<img src="man/figures/README-unnamed-chunk-1-1.png" width="100%" />

Merge

# Merge all landscapes into one
merged_landscape <- util_merge(fractal_landscape,
                               c(gradient_landscape, random_landscape),
                               scalingfactor = 1)

# Plot an overview
merge_vis <- list(
    "1) Primary" = fractal_landscape,
    "2) Secondary 1" = gradient_landscape,
    "3) Secondary 2" = random_landscape,
    "4) Result" = merged_landscape
)

show_landscape(merge_vis)
#> Warning: Removed 1196 rows containing missing values (geom_raster).
<img src="man/figures/README-unnamed-chunk-2-1.png" width="100%" />

See also

In the examples above we make heavy use of the NLMR package. Both packages were developed together until we split them into pure landscape functionality and utility tools. If you are interested in generating neutral landscapes via a multitude of available algorithms take a closer look at the NLMR package.

Meta

ropensci_footer