This R package was developed by JNCC under the Copernicus User Uptake Work Package 6 projects focussing on Bare Peat Mapping and Habitat Change Detection. It contains various functions involved in the preparation, statistical analysis and modelling with Sentinel-1 and Sentinel-2 data, as well as some designed for analysis of VHR data obtained from Defra's Aerial Photography GB (APGB) service.
- runS1Indices - Function to calculate RVI and RVIv indices from Sentinel 1 imagery
- s1thumbs - Script for creating S1 false colour thumbnails
- runIndices - Calculate indices for Sentinel-2 imagery
- s2_processing - Preparing Sentinel-2 imagery by cloud and shadow masking and calculating indices
- sat_varstack - Function for compiling variable stack from sentinel 2 imagery and indices
- APGBdate - Function to iterate through imagery and rename with a lookup date.
- comboAPGB - Function for combining the apgb RGB and CIR images
- zonal_stats - Zonal statistics function
- change_stats - calculates monthly, seasonal summaries per polygon, then calculates summary statistics per habitat type.
- create_square_bounding_box_polygon - This function creates a square bounding box polygon for a site, buffered by 10m so that it includes a margin of single raster pixels
- reduce_image_size - This function reduces the size of an image, saving the original image in an archive folder
- legend_thumbnail - This function creates a legend image for the thumbnails
- fileEdit - Function to edit the zonal stats txt files to remove additional rownames column and add a monthdate column
- fileEdit2 - Function to write the habitat names into the zonal stats txt files
- flag_change - Function to flag change using the outputs of the 'change_stats' function
- barethresh - Thresholding bare peat based on indices
- ClassProfile - Function script for analysing the differences between different classes in the imagery determined by points of polygons
- mask_bare - Will mask your classified bare peat image given specified areas to include and exclude
- MaskPeatSoils - Function to mask tiles to the peat soils and delete any tiles which do not overlap with peat soils.
- pcov_classify - Preparing the APGB classified images as percentage covers of bare peat.
- train_extract - Function to extract training data from a variable stack
- RFReg - function to run through random forest regression modelling with a given set of training data and timeseries of environmental variables.
- Bare_Peat_Detection.Rmd - Walkthrough of the fine-scale mapping processing detecting bare peat in APGB imagery.
- Bare_Peat_Regression.Rmd - Walkthrough of the time series detection of bare peat using Random Forest Regressions with Sentinel-2 imagery.
- Habitat_Change_detection.Rmd - Walkthough of the processes of detecting habitat changes in Sentinel-1 and 2 time series data using a defined spatial framework.