LU_to_LUC: Convert land-use transition targets to gross land-use change...

View source: R/LU_to_LUC.R

LU_to_LUCR Documentation

Convert land-use transition targets to gross land-use change transition targets

Description

Convert land-use transition targets to gross land-use change transition targets

Usage

LU_to_LUC(targets.from, targets.to, prior = NULL, keep_areas = "both")

Arguments

targets.from

A dataframe with columns lu and value (has to be numeric and >=0)

targets.to

A dataframe with columns lu and value (has to be numeric and >=0)

prior

A dataframe with columns lu.from, lu.to and value (has to be numeric and >=0)

keep_areas

Either "from", "to" or "both" (default). If sum(targets.from$value) is not equal to sum(targets.to$value) this parameter specifies to which value the output should sum to. If "both" is given and the sums differ, an artificial land use class NODATA is created.

Details

When given two land-use targets, this function creates potential gross land-use changes between them using Fienberg rebalancing. The transitions are forced towards keeping as much targets in the same class as possible. Using the prior argument you can either fully cancel out certain transitions (value=0) or put more emphasis on them (value>>0).

The total set of land use classes is the combination of unique lu values from targets.from and targets.to. If keep_areas = "both" the NODATA land use class is also created. Land use transitions are allocated to the NODATA class if the sum of targets.from is not equal to targets.to.

Value

A data.frame with columns lu.from, lu.to and value.

Examples

 targets.from = data.frame(lu = c("crop","grass"),value = c(10,5))
 targets.to = data.frame(lu = c("crop","grass","forest"),value = c(3,4,8))
 prior = data.frame(lu.from = "grass", lu.to = "forest", value = 0)
 res = LU_to_LUC(targets.from = targets.from,targets.to = targets.to, prior = prior)

tkrisztin/downscalr documentation built on June 2, 2025, 1:16 a.m.