SCBI-ForestGEO / 2023census

Repository for the 2023 recensus of the SCBI ForestGEO plot
Creative Commons Attribution 4.0 International
3 stars 0 forks source link

error "statusAbutUnhealthy" #49

Closed CarolineTroy closed 11 months ago

CarolineTroy commented 11 months ago

@ValentineHerr Hi Valentine - we have been getting the error "statusAbutUnhealthy" for some mortality census trees, but we aren't sure why this error is being reported for these trees. There doesn't seem to be any consistent similarity between trees with this error. What the criteria are for "statusAbutUnhealthy"? Thanks!

teixeirak commented 11 months ago

@CarolineTroy , thanks for asking. There's a file describing all the error checks here: https://github.com/SCBI-ForestGEO/2023census/blob/main/QAQC_reports/GitHubAction_checks.csv. The check for this error is:

mortality %in% 1 & mort_status %in% c('A') & (!fad %in% c(NA, '')| !is.na(wounded_main_stem) | !is.na(rotting_trunk) | !is.na(canker_swelling_deformity))

so if the tree is marked as Alive-healthy but a wound, rot, or canker are recorded. This is one you can fix without returning to the tree.

CarolineTroy commented 11 months ago

@teixeirak Thanks for your reply Krista. That makes sense, but in theory that should never occur, since in the app you are unable to add any FAD's unless the tree's status is "Alive Unhealthy." The FAD option isn't available to edit when trees are marked as "Alive." Maybe the code is also looking at previous mortality census data, and creating this error if there were FAD's in prior years?

ValentineHerr commented 11 months ago

The only cases I see do have a FAD even though they are "A":

image

I also noticed that they do not gave the corresponding rotting level, canker level etc.... I believe the issue is coming from the data entry, not for the script. Could it be that FAD was added later?

CarolineTroy commented 11 months ago

Thank for your reply, Valentine! We looked into it more and it looks like on the iPad, if you change the living_status selection from "Alive Unhealthy" to "Alive", any prior chosen FAD choices will remain, although they won't be visible once Alive is selected. We should be able to resolve these errors now.

ValentineHerr commented 11 months ago

Nice job figuring this out!

Closing this issue now.