Skip to content

Research project aggregating published data of communities species composition in several sites over time.

License

Notifications You must be signed in to change notification settings

chase-lab/metacommunity_surveys

Repository files navigation

DOI

Metacommunity surveys

Description

This research compendium regroups scripts used to download, re-structure and aggregate data sets to constitute a large meta-analysis of communities sampled at least twice, 10 years apart or more.

As of 2.4, data are provided in a raw and standardised states. Raw data were restructured to fit a common template and few modifications were made, see rulebook.md. Standardised data were restructured to fit a common template and the effort was standardised to be consistent between localities and years of the same region.

Variable definitions are in files:

   /data/definitions_communities.txt
   /data/definitions_metadata_raw.txt
   /data/definitions_metadata_standardised.txt

Availability

Latest version

The latest version can always be found on the dev branch but scripts there did not yet receive all the curation that the script getting to the main branch received.

Release v2.5-Blowes_etal_Science_Advances

   /data/communities_raw.rds
   /data/metadata_raw.rds
   /data/communities_standardised.rds
   /data/metadata_standardised.rds
  • Used by Dr Shane Blowes in the manuscript 'Synthesis reveals approximately balanced biotic differentiation and homogenization' published in Science Advances.

Release v1.0.0

Reproducibility and R environment

R Packages

To ensure that the working environment (R version and packages version) are documented and isolated, the package renv (https://rstudio.github.io/renv/index.html) was used. By running renv::restore(), renv will install all missing packages at once. This function will use the renv.lock file to download the same versions of packages that we used.

Execution

After downloading or cloning this repository, run renv::restore() and these scripts in order to download raw data, wrangle raw data and merge all data sets into one long table.

renv::restore()
# The raw data were stored in the project so users would not need to download them
# source('/R/1.0_downloading_raw_data.r')
source('/R/2.0_wrangling_raw_data.r')
source('/R/3.1_merging_long-format_tables_raw.r')
source('/R/3.2_merging_long-format_tables_standardised.r')

Additional installations

You might need to install the 64-bit version of Java to run the Tabulizer package.