Shapefiles to raster

Inside the Data-shp folder, you will find two sets of shapefiles. They are composed of several files and in order for them to work properly keep them all. First, we will transform those shapefiles to Raster files with the help of rgdal. #install.packages(c("rgdal","openxlsx") #only once library(rgdal) library(raster) library(landscapemetrics) library(tidyverse) library(ggsci) library(ggpubr) library(openxlsx) Read the shape files with readOGR. try_map <- readOGR("Data-shp/GLYlanduse.shp") #read your file Plot the map. plot(try_map) Currently, the map does not have a set of CRS so we will assign them to it because it is required for further analysis.

Landscape Metrics

This page was created to provide an additional option to quantify landscape configuration using R. The landscape subject to analysis is powerful and can represent any spatial phenomenon. R will quantify, sample, show, and the areal extent and spatial configuration of patches within a landscape. We will cover a few important steps for data analysis and visualization. Firstly, an introduction to how to use the package, the functions it has, and how to extract the information.

Reading files and basic syntax

Reading files There are several options to read a file containing your data not only numerical as R can read text, book pages, among others for different analysis. Similarly, your data does not need to be in an excel file, you are able to import a lot of formats as long as you are using the right package. Similarly, it can be directly obtained from other online data sources.

Software installation

R is an open source software, one of the leaders in its field. Learning R is learning programimg and all the carrer benefits you can get from having some experience with the program. If you are new to R then you will need to install a few things before being able to run landscapemetrics. This will be required only once. R First, we need to install R follow the link and then select your system.