nicholasjclark / phylo_func_trends

Using phylogenetic and functional relationships to inform nonlinear trend estimates from long-term biodiversity data
7 stars 1 forks source link

updating data prep script to support most recent BBS database and package #9

Closed AdamCSmithCWS closed 5 months ago

AdamCSmithCWS commented 7 months ago

Changes to support the most recent BBS dataset (counts up to 2022) and the newer version of the package bbsBayes2.

Also, includes:

  1. criteria to remove some of the data-sparse BCRs with very few routes and counts (here, this applies to two northern BCRs only)
  2. strata (i.e., BCR) specific data preparation to remove species and region combinations with no observations (i.e., no all zero datasets).
  3. criteria within strata to limit inclusion to species with > 100 observations (e.g., on average a bit less than 2 observations each year in the BCR).

All of the above can be removed by adjusting the explicit thresholds that are set in the code.

My testing so far indicates that the output from this updated script should feed seamlessly into the following scripts.