gjearevoll / BioDivMapping

A pipeline dedicated to analysing and visualising the biodiversity of different taxa in Norway
GNU General Public License v3.0
5 stars 3 forks source link

add utility to join taxa by functional groups to be moddelled as one species #72

Closed RRTogunov closed 9 months ago

RRTogunov commented 10 months ago

Why have changes been made?

some species have very little data and would be discarded of they were modelled on their own. New functionality allows for modelling any specified species jointly as part of a functional group. It works by changing the species name in the data file to the name of the functional group. data/external/focalTaxa.csv now has an additional column called "functionalGroup", for any taxa where functionalGroup remains unspecified will be modelled independently as usual. Any rows where "functionalGroup" is specified will have scientific name of those species changed to the string specified under "functionalGroup". In effect, all species with the same taxonomic group (i.e., "taxa" column) and of the same "functionalGroup" will be modelled as one species. The code also allows for species to be modelled simultaneously and as part of any number of functional groups by repeating the row and having different values under "functionalGroup". e.g., a specialist species may be included in a model on its own, with similar specialist species, and with generalist species by repeating the row for that species three times in data/external/focalTaxa.csv and specifying under functionalGroup "specialistA", "generalist", and "" (ie. left blank).

What changes have been made?