BiologicalRecordsCentre / sparta

Species Presence/Absence R Trends Analyses
http://biologicalrecordscentre.github.io/sparta/index.html
MIT License
21 stars 24 forks source link

Greater flexibility in specifying the observation model #75

Open drnickisaac opened 6 years ago

drnickisaac commented 6 years ago

Currently our observation model has only two options, both based on the list length. The conversion of list lengths to DATATYPEs is wrapped up inside sparta and inaccessible to the user. We are beginning to work with situations demanding more flexibility.

I first encountered this working with Galina for her Master's project recently. She has recording scheme data and a second dataset of museum specimens. We decided to recode the DATATYPEs as:

  1. recording scheme L=1
  2. recording scheme L>1
  3. museum specimens

To do this we ran OccDetFunc() for each dataset separately, then converted the list lengths for each before combining them. This "fools" sparta into coding DATATYPE as we'd like it.

We will want to do something similar when working with PoMS systematic survey data. I have spoken briefly with @GPowney about this.

It should be relatively straightforward to add extra options for how List lengths relate to DATATYPEs. I think Galina will get through her project without changes to sparta, but we should add this functionality when working on the PoMS data.