  This book chapter emphasizes the significance of categorical raster data in
ecological studies, specifically land use or land cover (LULC) data, and
highlights the pivotal role of landscape metrics and pattern-based spatial
analysis in comprehending environmental patterns and their dynamics. It
explores the usage of R packages, particularly landscapemetrics and motif, for
quantifying and analyzing landscape patterns using LULC data from three
distinct European regions. It showcases the computation, visualization, and
comparison of landscape metrics, while also addressing additional features such
as patch value extraction, sub-region sampling, and moving window computation.
Furthermore, the chapter delves into the intricacies of pattern-based spatial
analysis, explaining how spatial signatures are computed and how the motif
package facilitates comparisons and clustering of landscape patterns. The
chapter concludes by discussing the potential of customization and expansion of
the presented tools.
