bExplore: Exploratory backscatter layer analysis

View source: R/bExplore.R

bExploreR Documentation

Exploratory backscatter layer analysis

Description

Explore backscatter layer statistics and relationships prior to harmonization to inform the bulk shift procedure.

Usage

bExplore(
  x,
  y,
  preds = NULL,
  error_map = TRUE,
  boxplot = TRUE,
  error_plot = TRUE,
  loess = TRUE,
  loess_samp = 10000,
  ...
)

Arguments

x, y

terra SpatRasters. Backscatter layers to compare.

preds

terra SpatRaster. Predictors to explore for explaining error between x and y.

error_map

Logical. Whether to plot a map of error between x and y.

boxplot

Logical. Whether to draw boxplots comparing x and y. See Details.

error_plot

Logical. Whether to plot the error as a function of x, and also preds if specified.

loess

Logical. Whether to use loess to visualized the relationship between preds (including x) and the error.

loess_samp

Numeric. Maximum number of samples used to estimate the loess smoother. See Details.

...

Additional arguments to pass to loess. See Details.

Details

This function creates a series of helpful plots for comparing backscatter datasets prior to attempting harmonization (e.g., using bulkshift). Hit enter to proceed through the plots.

boxplot = TRUE draws box plots comparing the full distributions of x and y, and also the distributions only where they overlap. This is useful for assessing the representativeness of the area overlap (i.e., whether the error model will need to extrapolate).

Local polynomial fitting using loess can be slow with large sample sizes. Subsampling using loess_samp is used here only to fit the smoother; it is predicted on the entire dataset. Additional arguments can be passed to ... (see loess for more information).

Examples

bb2016 <- rast(system.file('extdata', 'bb2016.tif', package='bulkshift'))
bb2017 <- rast(system.file('extdata', 'bb2017.tif', package='bulkshift'))
bbdepth <- rast(system.file('extdata', 'bbdepth.tif', package='bulkshift'))

bExplore(bb2017, bb2016, preds = bbdepth)


benjaminmisiuk/bulkshift documentation built on May 24, 2023, 9:32 p.m.