Closed RRTogunov closed 6 months ago
I agree with your suggestion that it should be in focal taxa
linked to this, environmentalTaxa imports all covariates in all taxa, whether or not they are imported (eg if only modelling vascularPlants, but have specified "selected_fungi" in focalCovariates.CSV, all fungi covariates will be imported). https://github.com/gjearevoll/BioDivMapping/blob/281554e530c033f7e2650c78aec661c30b4bb413/pipeline/import/environmentalImport.R#L54
Regarding taxa-specific covariate specification, current approach utilises a "selected_speciesGroup" for each taxa in focalCovariates. However, I think it would be more intuitive to specify desired covariates as columns in focalTaxa rather than a column for each taxa in focalCovariates. I can see it being cumbersome to add/remove taxa columns in focalCovariates, especially if there are many taxa (eg, in another application of this pipeline, I have ~300 rows of "taxa" in focalTaxa). In contrast, as number of available covariates is relatively static, I think it is would be easier to specify covariates in focalTaxa.csv. The change would also replace the "selected_speciesGroup" syntax with covariate columns in focalTaxa with the same name as the covariates itself.
It's not a critical issue for me, so I default to what the majority think.