traitecoevo / traits.build

Source for the traits.build R package, used to build AusTraits
https://traitecoevo.github.io/traits.build/
Other
8 stars 0 forks source link

taxon_names excluded in `exclude_obesrvations` appearing in taxonomic_updates and taxa tables #115

Closed ehwenk closed 10 months ago

ehwenk commented 10 months ago

Currently taxon names that are explicitly excluded through exclude observations are still showing up in the taxonomic_updates and taxa tables - these then keep appearing was taxa requiring alignments.

Adding at line 195 in process.R

  taxa_to_exclude <- 
    metadata$exclude_observations %>%
    traits.build::util_list_to_df2() %>%
    dplyr::mutate(
      find = stringr::str_split(.data$find, ", ")
      ) %>%
    tidyr::unnest_longer(.data$find) %>%
    dplyr::filter(variable == "taxon_name")

followed by in the next chunk:

    dplyr::filter(!.data$aligned_name %in% taxa_to_exclude$find) %>%

Solves the problem. Waiting for other branches to merge to implement

ehwenk commented 10 months ago

Closed with commit d3e1416