To contribute an indicator workflow to this repo, please follow the steps below:
- Clone this repo
- Switch to
devbranch and pull - Build the package Ctrl + Shift + B
- Create branch off
devfor your indicator. Name the branch the same name as your indicator - Add a main wrapper workflow function in
data-rawfolder. Name itworkflow_<ecodata_dataset_name>.r- This function should take only filepaths as arguments and should
save the ecodata data set (see examples that already exist in the
data-rawfolder) - Wrap the
workflow_<ecodata_dataset_name>function in atryCatch()statement. See existing workflows for how this is implemented
- This function should take only filepaths as arguments and should
save the ecodata data set (see examples that already exist in the
- Add file in the
Rfolder. Name this as<ecodata_dataset_name>.r.- This file should contain the set of functions required to calculate
the indicator. The format of the indicator should match the format as
found in the
ecodatapackage. You may need to look at theecodata/data-raw/get_<your_indicator>function to see any additional formatting that is required - This/these functions should be called from the
workflow_<ecodata_dataset_name>.rfunction - All functions should only take file paths as arguments. All data dependencies should be read in by passing a file path to the data.
- This file should contain the set of functions required to calculate
the indicator. The format of the indicator should match the format as
found in the
- Check that there is a
create_ecodata_dataset_name.Rdfile in themanfolder. If not, rundevtools::document()to create and commit one. - Add any packages used to create the indicator in the
DESCRIPTIONfile. - Add instructions in the
tempate_readme.mdfile (in the root of this repo) - Final testing should be done inside your Rstudio container. (You’ll need to repeat the first few steps; clone, pull, build)
- To test your workflow use the
example_test_runs.ras a template. - To test the R package, please build the package and then run
devtools::check(), either from the command line or click thecheckbutton under the build tab in Rstudio- If any errors arise (you can ignore
Notesandwarnings), please try to fix them prior to creating a pull request
- If any errors arise (you can ignore
- When checks pass, create a pull request into the
devbranch and assign two people as reviewers