Skip to content

R package to run mapme pipelines configured in YAML

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

mapme-initiative/mapme.pipelines

Repository files navigation

Lifecycle: experimental R-CMD-check

mapme.pipelines

The codes in this repository are currently WIP. The goal of this project is to conduct large-scale analysis of globally distributed portfolios based on reproducible pipelines powered by {mapme.biodiversity}.

To reduce the production of boilerplate code when using conducting analysis with mapme.biodiversity one can instead produce a high-level YAML file indicating input/output files, options as well as which resources to fetch and indicators to calculate.

To install the package run:

remotes::install_github("mapme-initiative/mapme.pipelines")

The package exports a single function called run_config() which you should point towards a YAML file. Suppose you wanted to run the calc_treecover_area() indicator for a GeoPackage called my-polygons.gpkg, the yaml should look something like this:

input: ./my-polygons.gpkg
output: ./my-polygons-treecover.gpkg
datadir: ./data
options:
  maxcores: 4
  progress: true
  chunksize: 50000
resources:
  get_gfw_treecover:
    args:
      version: GFC-2023-v1.11
  get_gfw_lossyear:
    args: 
      version: GFC-2023-v1.11
indicators:
  calc_treecover_area:
    args: 
      min_cover: 30
      min_size: 1

Putting the content above in a file called config.yaml, all we have to do to run the configured pipeline is:

library(mapme.biodiversity)
library(mapme.pipelines)
run_config("./config.yaml")

See help(run_config) for additional details how to customize your pipeline.

About

R package to run mapme pipelines configured in YAML

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages