EnergyEconomyDecoupling / PFUPipeline

Primary, Final, and Useful energy and exergy for 1960-2019
https://energyeconomydecoupling.github.io/PFUPipeline/
Other
3 stars 0 forks source link

CRAN
status Lifecycle:
stable Project Status: Active – The project has reached a stable, usable
state and is being actively
developed. DOI

PFUPipeline

Statement of need

The CL-PFU database uses many sources of input data spanning hundreds of data files. When creating the CL-PFU database, matrices are created according to the PSUT framework, final energy data are extended to the useful stage, and energy conversion chains are converted to exergy quantifications. A way to specify all calculation steps is needed. Furthermore, the calculations take many hours to complete, so what is done should stay done during debugging. Calculation pipelines are needed, ones that clearly identify all steps in database creation and ones that can be resumed where needed.

This package (PFUPipeline) provides functions to create several products of the CL-PFU database. The primary objective of PFUPipeline is to create data frames of RUVY matrices in matsindf format. A targets pipeline provides helpful dependency management for the calculations.

Quick start

At the RStudio console, type

library(targets)              # to load the targets package   
tar_visnetwork()              # to see a directed acyclic graph of the calculations that will take place   
tar_make_future(workers = 2)  # to execute the calculations (or `workers = 8`, if you have enough cores)

Accessing targets

A list of targets can be found with PFUPipeline::target_names. A list of target meanings can be found with ?PFUPipeline::target_names.

targets::tar_read(<<target>>) pulls the value of a target out of the targets cache. (<<target>> should be an unquoted symbol such as Specified.)

Fresh start

targets::tar_destroy() invalidates the targets cache and forces reanalysis of everything. Reanalyzing everything may take a while.

More Information

For information about the targets package, see the targets manual.

For documentation on the PFUPipeline package, see https://EnergyEconomyDecoupling.github.io/PFUPipeline/.

History

The CL-PFU database is supported by an EPSRC fellowship awarded to Paul Brockway of Leeds University. A goal of the fellowship is building a world database of country-specific primary, final, and useful exergy for 1960–2019.

Contributors