Code Monkey home page Code Monkey logo

nceadfo's Introduction

nceadfo

License: GPL (>= 2) LifeCycle

This repository contains the research compendium for ther project “Evaluating the cumulative effects of global changes on the ecological communities of the Scotian Shelf Bioregion”. It contains all the code required to import, format, and integrate the data needed for the assessment, as well as the code used to perform the analyses, figures, and the project report.

Since data should not be stored on GitHub, no data are found on this repository; the code structuring all steps of the assessment must therefore be executed to replicate the assessment. It should however be noted that certain datasets are not accessible online due to data sharing agreements, such as the fisheries data from the Department of Fisheries and Oceans Canada. It is therefore necessary to contact us or the data holders to obtain these data. Metadata and bibliographic files associated with every dataset used are however available.

How to cite

Please cite this research compendium as follows:

Beauchesne D (2023) Research compendium for the assessment of cumulative effects of global changes on the ecological communities of the Scotian Shelf Bioregion. Consulted on [AAAA-MM-JJ]. https://github.com/Ecosystem-Assessments/nceadfo.

Content

This research compendium is structured as follows:

  • data/: contains the data for the assessment.

    • aoi/: spatial data on the area of interest
    • basemap/: spatial data used to generate the maps of the assessment
    • cea_modules/: formatted data used to perform the cumulative effects assessment
    • config/: configuration files used to access and format raw data and parameters used throughout the project (e.g. spatial projection, colors, bounding box, etc.)
    • data-abiotic/: formatted abiotic data used for species distribution modelling
    • data-biotic/: data on species distribution in the area of interest
    • data-integrated/: integrated datasets
    • data-metaweb/: metaweb of species interactions in the area of interest
    • data-raw/: raw data used for the cumulative effects assessment
    • drivers/: formatted data on environmental drivers in the area of interest
    • eDrivers/: formatted data used for the eDrivers platform
    • format_modules/: formatted data used to perform the cumulative effects assessment as .RData files for ease of execution
    • grid/: study grid for the cumulative effects assessment
    • metadata/: metadata and contacts for the raw data used for the cumulative effects assessment
  • docs/: contains the html version of the report of the cumulative effects assessment

  • figures/: contains all the figures generated for the cumulative effects assessment

  • man/: contains the documentation for all R functions that are part of the research compendium

  • output/: contains all the outputs from the cumulative effects assessment

    • cea/: community-aggregated cumulative effects assessment for species-scale and network-scale assessments
    • cea_difference/: difference in cumulative effects between the temporal periods considered for the assessment
    • cea_km2/: assessment of cumulative effects per km^2 for all taxa considered
    • cea_network/: results for the network-scale cumulative effects assessment for all taxa
    • cea_species/: results for the species-scale cumulative effects assessment for all taxa
    • exposure/: exposure of taxa to cumulative effects
    • footprint/: species richness and cumulative drivers
  • R/: contains R functions developped for the assessment

    • fig_name.R: scripts to generate figures
    • fnc_name.R: generic functions used throughout the research compendium
    • format_modules.R: script to prepare .RData files for assessmemnt
    • gather_name.R: scripts to gather information on data used for the assessment
    • get_name.R: scripts to access base data for the project
    • make_name.R scripts to prepare the modules used for the assessment
    • out_name.R: scripts to perform the assessment and extract summaries
    • pipeline.R: script that executes the entirety of the assessment. ⚠️ if run, this script will take multiple days to run. Also take into consideration that the network-scale cumulative effects assessment should be run on externally on clusters like those offered by Compute Canada as each taxa should take at least 10-20 hours to execute locally depending on your hardware. Furthermore, not all data are available online due to data sharing agreements.
    • render_report.R: script to render the assessment report
  • report/: contains the R Markdown version of the assessment report

  • DESCRIPTION: research compendium metadata (authors, date, dependencies, etc.)

  • README.Rmd: description of research compendium

pipedat

The nceadfo assessment heavily relies on the pipedat package. As stated in the package description:

pipedat is a R package that provides analytical pipelines to access, load, and format a variety of data from multiple sources programatically. The goal of pipedat is to enhance the capacity scientists, planners and the wider public to prepare and perform complex and reproducible ecosystem-scale assessments requiring the integration of multiple spatial datasets such as cumulative effects assessments in the context of ecosystem-based management, and Marxan analyses for the establishment of individual and networks of MPAs. In its current format, pipedat is strictly experimental and in development. We are however hoping to further develop this initiative in the hopes of greatly enhancing the efficiency, transparency and reproducibility of large-scale environmental assessments.

The development of pipedat was first thought off through nceadfo, yet it is not a part of it. Now that I have seen the potential usability of pipedat, and how it could be formalized, there is a desire to continue building it and making it better and simpler with the lessons learned through the nceadfo assessment. As such, there is a pipedat release (v0.0.1-nceadfo) that provides the specific version of the package that was used for the nceadfo assessment. There is also a static version of the package available directly in the nceadfo research compendium in data/pipedat-package/, which means that a user could clone this research compendium and install the package directly, like this (for iOS):

cd ./data/pipedat-package
R CMD INSTALL .

How to use

Clone this repo and execute the following commands to execute the whole assessment.

⚠️ execution time is very long, and not all raw data are accessible online. This research compendium is thus not fully reproducible due to hardware limitations and data sharing agreements.

R -e 'library(devtools);document()'
R CMD INSTALL .
R
source("_pipeline.R")

nceadfo's People

Contributors

david-beauchesne avatar

Stargazers

 avatar

Watchers

 avatar

nceadfo's Issues

Update binary interaction catalogue

The binary interaction catalogue used to predict species interactions should be updated. The code is already somewhat done in pipedat (id: 7a5323bb), but it should be done in batches and exported as the process moves along. Due to connexion errors, the process keeps crashing. The fix seems easy enough, but at this point in the project I do not have time to update it.

Steps:

  • Load all known interactions of families, genera and species found in the species list.
  • Do this in batches of 100 or 1000 and save the results as the process moves along
  • Combine with the preexisting catalogue that was built for the St. Lawrence
  • Reevaluate the metaweb of the Scotian Shelf
  • Rerun cea network analysis
  • Update all results

Redo stressor standardization

At the moment, I standardized the drivers only with their own data, meaning for example that demersal fisheries for 2010-2015 was transformed only using the data from that period. However, this makers the results for ther change in cumulative effects over time less reliable than if standardization was made from the joint distribution of demersal fishries from 2010-2015 and 2016-2021. This should be changed accordingly.

Change `format_modules` script

For the sake of efficiency at this point, I'm taking the scripts from my thesis to perform the last stages of the assessment. These scripts use raster rather than stars. This should be corrected later on in the process to avoid working with RData object and avoid working with the raster package

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.