Skip to content

Comments

Second draft for NO_GJEN_001#67

Draft
idammie wants to merge 4 commits intoNINAnor:mainfrom
idammie:gjengroingv2
Draft

Second draft for NO_GJEN_001#67
idammie wants to merge 4 commits intoNINAnor:mainfrom
idammie:gjengroingv2

Conversation

@idammie
Copy link

@idammie idammie commented Nov 20, 2024

No description provided.

@idammie idammie changed the title Fixed text and some code Second draft for NO_GJEN_001 Nov 20, 2024
@anders-kolstad anders-kolstad marked this pull request as ready for review December 13, 2024 08:33
Copy link
Collaborator

@anders-kolstad anders-kolstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a rapid reviw of this updated version of NO_GJEN_001 and would requests some minor edits before merging. Theu are mainly formatting issues tha I can fix myself. Will pick this up again next year.

See PR review checklist #84

meta <- readxl::read_xlsx("../metadata.xlsx")
st <- meta |>
filter(Variable == "status") |>
st <- meta %>%
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the pipe operator? Best to use the native R pipe, no?

- **Definition of lower threshold value (X~0~)** **for naturally open areas.** For the naturally open areas, we sat a specific threshold (0.8 m) for when the population polygons (GRUK) for naturally open areas would have a poor condition. However, tests should be done to find a more proper threshold. This could for example be using the field-based assessments of ecological condition and compare these with the LiDAR-based vegetation heights to find a proper threshold.

- **Quantification of uncertainty around indicator scores.** Here we used the standard deviation in the vegetation heights for reference (NiN) polygons within each region to quantify the uncertainty around scaled indicator scores. We did this because the method used in `eaTools::ea_spread()` function is a bootstrapping approach which resulted in extremely small uncertainty estimates due to the large number of polygons included in our analysis. [In the future, a better method for quantifying uncertainty is needed.](https://github.com/NINAnor/eaTools/issues/17) Perhaps by running sensitivity analyses that test several variations of the points mentioned above can form the basis for quantifying an error margin around indicator values.
- **Selection of scaling function and define threshold value for good ecological condition.** In the investigation part of how to calculate the encroachment index (not presented here), we tested three different scaling functions (Sigmoid (as presented in an earlier version), Exponential and Linear) where we ended up using the Linear scaling function. However, further testing of scaling functions should be done in the future, especially in regards to defining a threshold value for good ecological condition. Here we only define the upper and lower limits of ecological condition. However the results presented in section 10.4 suggests that it would be beneficial for the encroachment index to also have a threshold value for good ecological condition (X~60~). One way could be to calculate the 90th percentile for vegetation height in the reference polygons and set this as X~60~, but a proper threshold value should be investigated.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

ifelse(region_id == 2, 'Midt-Norge',
ifelse(region_id == 3, 'Østlandet',
ifelse(region_id == 4, 'Vestlandet', 'Sørlandet'))))) %>%
mutate(region = case_when(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

ecosysttype <- ecosysttypes[i]

# Import median LiDAR heights for NiN polygons (references)
# Import median LiDAR heights for NiN MI polygons (references)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to specify that it is from MI

ecosysttypes <- c("vaatmark", "aapne", "semi")

# Need to filter out the ones where data is also on semi-natural types that are not in a good condition
nin_good_condition <- st_read("/data/P-Prosjekter2/412421_okologisk_tilstand_2024/Data/NiN/nin_cleaned_condition.shp") %>%
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding quiet = T wil supress messages from st_read()

The encroachment condition indicator scores are on average above 0.8 and therefore indicate a good overall condition in Norway (@fig-regional-level-enc-forest). Østlandet comes out best for wetland and semi-natural ecosystems. Nord-Norge has poorest condition for semi-natural ecosystems, while Vestlandet has the poorest scores for wetland.

### 10.1 Scaled indicator values at the level of homogeneous ecosystem areas {#sec-HEA}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set warning: false

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use use legend.position.inside instead of legend.position

ggtitle('C) Semi-naturlig')



Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IN fig-regional-level-enc-forest caption, add note that indicator values are not final, and serve only as prrof of concept for the indicator workflow

```{r fig-validation-enc, fig.cap="Box plot displaying encroachment indicator values against the field-based ecological condition sub-score Rask suksesjon in semi-natural ecosystems"}

These results suggest that, at least for semi-natural ecosystems, using polygons with an overall good condition score will still give reference heights that are suitable for calculating the gjengroing index.
str(rasksuksIndexPoly)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hash out

str(rasksuksIndexPoly)

```{r validation-enc-index, fig.cap="Scatter plot displaying reference heights for good condition according to NiN field-mapping ecological condition overall score and sub-score for Rask suksesjon in semi-natural ecosystems"}
rasksuksIndexPoly %>%
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set warning: false

```

## 12. Export file
fig-validation-enc shows that encroachment indicator has higher values (good condition) with the better condition scores for Rask suksesjon (1=good) and that the condition does indeed get poorer when Rask suksesjon has a poorer condition score (3 and 4). However, all Rask suksesjon values have relatively high encroachment indicator scores (mean \> 0.8), suggesting that the encroachment indicator is giving better condition scores than what is actually measured in the field. A reason for this can be that the scaling function does not fit well with the data or that the indicator also needs a threshold value for when the condition is good or not (X~60~).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @ at the start to fix cross ref

@anders-kolstad anders-kolstad added the Indicator Things tagged with 'Indicator' will appear the the GitHub project called 'ecRxiv reviews' label Dec 5, 2025
@anders-kolstad anders-kolstad linked an issue Dec 5, 2025 that may be closed by this pull request
@anders-kolstad anders-kolstad marked this pull request as draft January 16, 2026 12:16
@anders-kolstad
Copy link
Collaborator

This PR has gone stale so I make it into a draft PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Indicator Things tagged with 'Indicator' will appear the the GitHub project called 'ecRxiv reviews' NO_GJEN_001

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New PR]: NO_GJEN_001_#67 Underestimering av myrareal [REVIEW]: "NO_GJEN_001_våtmark" [REVIEW]: no_gjen_001_seminaturlig

2 participants