icraf-indonesia / lumens-shiny

Development LUMENS into Shiny version
MIT License
0 stars 0 forks source link

Reactivating QuES-B #9

Open dindiarto opened 3 weeks ago

dindiarto commented 3 weeks ago

QuES-B (Quantification of Environmental Services for Biodiversity) is a LUMENS module designed to analyse focal area and habitat conditions and their changes within landscapes.

Objective

To reactivate and improve the QuES-B module into a fully functional yet simple Shiny application.

Key Input Parameters

Parameter Type Example Variable Name
Land use/cover map (t1) Raster file lc2000.tif lc_t1
Land use/cover map (t2) Raster file lc2005.tif lc_t2
Land use/cover classification and Focal area lookup Data frame ID: 1, Legend: "Forest", BIODIV: 1 lulc_lut
Edge contrast table Matrix From: "Forest", To: "Agriculture", Value: 0.8 contab
Time period 1 Numeric 2000 t1
Time period 2 Numeric 2005 t2
Window shape Numeric (1 or 2) 1 (Square) window.shape
Window size (meters) Numeric 1000 windowsize
Grid resolution (meters) Numeric 10000 gridres
Raster nodata value Numeric 0 raster.nodata

Proposed Workflow

1. Data Preparation and Validation

2. Fragstats Input Preparation

3. Core Analysis

4. Results Processing

5. Reporting

Tasks

dindiarto commented 3 weeks ago

What are the required inputs for executing the TECI analysis in fragstats via R?

Required Inputs:

Prepare Fragstats input files:

Set up Fragstats execution

Execute Fragstats

Handle Fragstats output:


Positive Background Values:

We should assign nodata areas as positive background values. The result: image

We might need to increase the dimensions of the raster by two times the moving-window radius on each side of the rectangle to handle the boundary effect.

dindiarto commented 2 weeks ago

The first attempt to calculate DIFA in a tidy style

head(teci_table, 5)
# A tibble: 954 × 2
    TECI FocalArea
   <dbl>     <dbl>
 1     0    0.0758
 2     0    0.165 
 3     0    0.266 
 4     0    0.362 
 5     0    0.462 

tail(teci_table, 5)
# A tibble: 5 × 2
   TECI FocalArea
  <dbl>     <dbl>
1  62.4      25.1
2  64.5      25.1
3  76.0      25.1
4  78.4      25.1
5 100        25.1

plot(teci_table)
image