ToonVanDaele / trias-test

test repository ofr trias
0 stars 0 forks source link

Code to aggregate model outputs per indicator #3

Closed damianooldoni closed 4 years ago

damianooldoni commented 4 years ago

This issue is just a note to store code to get one emerging value per indicator. If we have basic GAM and decision tree per indicator (number of occurrences and Area Of Occupancy):

# Get one value per indicator (if GAM_*: NA -> DT_*)
result_indicator_df <-
  result_models_df %>%
  group_by(taxonKey, canonicalName, eyear) %>%
  summarize(occ = ifelse(is.na(GAM_occs), DT_occs, GAM_occs),
            aoo = ifelse(is.na(GAM_aoo), DT_aoo, GAM_aoo)
  )

If we have other better methods, then we can include them by using a case_when().

damianooldoni commented 4 years ago

@ToonVanDaele : can it be closed maybe? I think so.

ToonVanDaele commented 4 years ago

Thanks for the suggestion. Implemented!

This is my first issue ever I close