traitecoevo / austraits.build

Source for AusTraits
Other
16 stars 2 forks source link

Instances when a `trait_name` is read in multiple times in the metadata.yml file #567

Closed ehwenk closed 2 years ago

ehwenk commented 2 years ago

There are a handful of studies where there are multiple columns of data mapped onto the same trait_name. This presents a problem any time you want to take AusTraits data and spread/pivot_wider data because a column is duplicated that "shouldn't be" (e.g. observation_id, methods for a single trait_name x taxon_name x dataset_id

austraits$methods %>% select(dataset_id, trait_name) %>% group_by(dataset_id, trait_name) %>% count() %>% filter(n>1)

This - and the vast majority of others - are floras or taxonomic treatments where the leaf, seed, etc. dimensions have been programmatically deconstructed into the minimum and maximum and are read in as separate traits. I'm not sure what the best solution is here, because it depends on the use case.

ehwenk commented 2 years ago

Two separate enhancements to the AusTraits workflow will address this issue.

ehwenk commented 2 years ago

closed with 4dab6ab