This function computes the overall suitability scores and class of the land units.

overall_suit(suit, method = NULL, interval = NULL)

Arguments

suit

an object of class suitability.

method

a character for the method for computing the overall suitability, choices are: "minimum", "maximum", and "average". If NULL, method is set to "minimum".

interval

if NULL, the interval of the suitability class are the following: 0% - 25% (Not suitable, N), 25% - 50% (Marginally Suitable, S3), 50% - 75% (Moderately Suitable, S2), and 75% - 100% (Highly Suitable, S1). But users can assign custom intervals by specifying the values of the end points of the intervals. Say for intervals: 0% - 20% (Not suitable, N), 20% - 50% (Marginally Suitable, S3), 50% - 80% (Moderately Suitable, S2), and 80% - 100% (Highly Suitable, S1), is equivalent to interval = c(0, 0.2, 0.5, 0.8, 1).

Value

A data frame with columns:

  • Score - the overall suitability scores

  • Class - the overall suitability classes

See also

https://alstat.github.io/ALUES/; suit

Examples

# The overall suitability can be computed using the `overall_suit` 
# function, which takes an object of class suitability. For example,
library(ALUES)
banana_suit <- suit("banana", terrain=MarinduqueLT)
#> Warning: maximum is set to 16 for factor CECc since all parameter intervals are equal.
class(banana_suit[["terrain"]])
#> [1] "character"
class(banana_suit[["soil"]])
#> [1] "suitability"

# If we take a look at the output of both terrain and soil 
# characteristics, we have:

# lapply is used to show the head of each item in the list
lapply(banana_suit[["terrain"]], function(x) head(x)) 
#> [[1]]
#> [1] "Error: No factor(s) to be evaluated, since none matches with the crop requirements. If water or temp characteristics was specified then maybe you forgot to specify the sow_month argument, read doc for suit."
#> 
lapply(banana_suit[["soil"]], function(x) head(x)) 
#> $`Factors Evaluated`
#> [1] "CFragm" "CECc"   "pHH2O"  "SoilTe"
#> 
#> $`Suitability Score`
#>      CFragm   CECc pHH2O SoilTe
#> 1 0.8533333 0.7500     0   0.96
#> 2 0.8800000 0.7500     0   0.96
#> 3 0.8666667 0.7500     0   0.96
#> 4 0.8666667 0.7500     0   0.96
#> 5 0.8400000 0.7500     0   0.96
#> 6 0.8533333 0.8125     0   0.96
#> 
#> $`Suitability Class`
#>   CFragm CECc pHH2O SoilTe
#> 1     S1   S1     N     S1
#> 2     S1   S1     N     S1
#> 3     S1   S1     N     S1
#> 4     S1   S1     N     S1
#> 5     S1   S1     N     S1
#> 6     S1   S1     N     S1
#> 
#> $`Factors' Minimum Values`
#> CFragm   CECc  pHH2O SoilTe 
#>      0      0      0      0 
#> 
#> $`Factors' Maximum Values`
#> CFragm   CECc  pHH2O SoilTe 
#>  75.00  16.00   8.94  12.50 
#> 
#> $`Factors' Weights`
#> [1] 3 3 3 2
#> 
#> $`Crop Evaluated`
#> [1] "BANANASoil"
#> 
#> $Warning
#> [1] "maximum is set to 16 for factor CECc since all parameter intervals are equal."
#> 

# There are no factors targetted for the terrain 
# characteristics, that is why the returned value is a 
# string error. Thus, only the soil characteristics can 
# have an overall suitability, and is computed as follows:
ovsuit <- overall_suit(banana_suit[["soil"]])
head(ovsuit)
#>   Score Class
#> 1     0     N
#> 2     0     N
#> 3     0     N
#> 4     0     N
#> 5     0     N
#> 6     0     N

# By default, the `overall_suit` function uses minimum 
# as a summary statistics, hence the 0 scores and N 
# classes across land units. To adjust this to average 
# aggregation, use the `method` argument to specify.
ovsuit <- overall_suit(banana_suit[["soil"]], method="average")
head(ovsuit)
#>       Score Class
#> 1 0.6505051    S2
#> 2 0.6569697    S2
#> 3 0.6537374    S2
#> 4 0.6537374    S2
#> 5 0.6472727    S2
#> 6 0.6656566    S2

## Intervals
# By default, the `overall_suit` uses an equally spaced 
# interval for the suitability classes, that is, 
# N [0, 0.25), S3 [0.25, 0.50), S2 [0.50, 0.75), 
# and S1 [0.75, 1]. This can be changed using the 
# `interval` argument, for example
ovsuit <- overall_suit(banana_suit[["soil"]], method="average", 
interval=c(0, 0.6, 0.7, 0.9, 1))
head(ovsuit)
#>       Score Class
#> 1 0.6505051    S3
#> 2 0.6569697    S3
#> 3 0.6537374    S3
#> 4 0.6537374    S3
#> 5 0.6472727    S3
#> 6 0.6656566    S3

# The above code sets the suitability class intervals 
# into: N [0, 0.60), S3 [0.60, 0.70), S2 [0.70, 0.90), 
# and S1 [0.90, 1]. It should be emphasized that the 
# `interval` argument cannot be set to `unbias` as in 
# the case of the `interval` argument of the `suit` 
# function. This follows from the fact that the 
# `overall_suit` function does not use a membership 
# function for computing the score, but an aggregation function.

# Other examples
library(ALUES)
out <- suit("ricebr", terrain=MarinduqueLT, 
water=MarinduqueWater, temp=MarinduqueTemp, sow_month=1)
#> Warning: maximum is set to 16 for factor CECc since all parameter intervals are equal.
lapply(out[["terrain"]], function(x) head(x))
#> [[1]]
#> [1] "Error: No factor(s) to be evaluated, since none matches with the crop requirements. If water or temp characteristics was specified then maybe you forgot to specify the sow_month argument, read doc for suit."
#> 
lapply(out[["water"]], function(x) head(x))
#> $`Factors Evaluated`
#> [1] "Jan" "Feb" "Mar" "Apr"
#> 
#> $`Suitability Score`
#>         Jan       Feb       Mar       Apr
#> 1 0.3051852 0.1925926 0.1629630 0.3542857
#> 2 0.3081481 0.1925926 0.1629630 0.3485714
#> 3 0.3081481 0.1955556 0.1659259 0.3485714
#> 4 0.3111111 0.1925926 0.1688889 0.3371429
#> 5 0.3111111 0.1925926 0.1718519 0.3371429
#> 6 0.3140741 0.1955556 0.1748148 0.3257143
#> 
#> $`Suitability Class`
#>   Jan Feb Mar Apr
#> 1  S3   N   N  S3
#> 2  S3   N   N  S3
#> 3  S3   N   N  S3
#> 4  S3   N   N  S3
#> 5  S3   N   N  S3
#> 6  S3   N   N  S3
#> 
#> $`Factors' Minimum Values`
#> Jan Feb Mar Apr 
#>   0   0   0   0 
#> 
#> $`Factors' Maximum Values`
#>   Jan   Feb   Mar   Apr 
#> 880.0 880.0 880.0 714.2 
#> 
#> $`Factors' Weights`
#> [1] NA NA NA NA
#> 
#> $`Crop Evaluated`
#> [1] "RICEBRWater"
#> 

# Soil Overall Suitability
head(overall_suit(out[["soil"]]))
#>   Score Class
#> 1     0     N
#> 2     0     N
#> 3     0     N
#> 4     0     N
#> 5     0     N
#> 6     0     N
head(overall_suit(out[["soil"]], "average"))
#>       Score Class
#> 1 0.5114379    S2
#> 2 0.5245098    S2
#> 3 0.5179739    S2
#> 4 0.5179739    S2
#> 5 0.5049020    S2
#> 6 0.5322712    S2
head(overall_suit(out[["soil"]], "maximum"))
#>       Score Class
#> 1 0.7843137    S1
#> 2 0.8235294    S1
#> 3 0.8039216    S1
#> 4 0.8039216    S1
#> 5 0.7647059    S1
#> 6 0.8125000    S1
head(overall_suit(out[["soil"]], "average", c(0, 0.3, 0.35, 0.6, 1.0)))
#>       Score Class
#> 1 0.5114379    S2
#> 2 0.5245098    S2
#> 3 0.5179739    S2
#> 4 0.5179739    S2
#> 5 0.5049020    S2
#> 6 0.5322712    S2

# Water Overall Suitability
head(overall_suit(out[["water"]], "average"))
#>       Score Class
#> 1 0.2537566    S3
#> 2 0.2530688    S3
#> 3 0.2545503    S3
#> 4 0.2524339    S3
#> 5 0.2531746    S3
#> 6 0.2525397    S3
head(overall_suit(out[["water"]], "maximum"))
#>       Score Class
#> 1 0.3542857    S3
#> 2 0.3485714    S3
#> 3 0.3485714    S3
#> 4 0.3371429    S3
#> 5 0.3371429    S3
#> 6 0.3257143    S3
head(overall_suit(out[["water"]], "average", c(0, 0.3, 0.35, 0.6, 1.0)))
#>       Score Class
#> 1 0.2537566     N
#> 2 0.2530688     N
#> 3 0.2545503     N
#> 4 0.2524339     N
#> 5 0.2531746     N
#> 6 0.2525397     N

# Temperature Overall Suitability
head(overall_suit(out[["temp"]], "average"))
#> Warning: No overall suitability computed since there is only one factor.
#>       Score Class
#> 1 0.8366667    S1
#> 2 0.8333333    S1
#> 3 0.8400000    S1
#> 4 0.8366667    S1
#> 5 0.8366667    S1
#> 6 0.8500000    S1
head(overall_suit(out[["temp"]], "maximum"))
#> Warning: No overall suitability computed since there is only one factor.
#>       Score Class
#> 1 0.8366667    S1
#> 2 0.8333333    S1
#> 3 0.8400000    S1
#> 4 0.8366667    S1
#> 5 0.8366667    S1
#> 6 0.8500000    S1
head(overall_suit(out[["temp"]], "average", c(0, 0.3, 0.35, 0.6, 1.0)))
#> Warning: No overall suitability computed since there is only one factor.
#>       Score Class
#> 1 0.8366667    S1
#> 2 0.8333333    S1
#> 3 0.8400000    S1
#> 4 0.8366667    S1
#> 5 0.8366667    S1
#> 6 0.8500000    S1