Title: | Run 'PACTA' on Multiple Loan Books Easily |
Version: | 0.1.1 |
Description: | Run Paris Agreement Capital Transition Assessment ('PACTA') analyses on multiple loan books in a structured way. Provides access to standard 'PACTA' metrics and additional 'PACTA'-related metrics for multiple loan books. Results take the form of 'csv' files and plots and are exported to user-specified project paths. |
Encoding: | UTF-8 |
Imports: | cli (≥ 3.2.0), config, dplyr, ggalluvial, ggplot2, ggrepel, glue, r2dii.analysis (≥ 0.3.0), r2dii.data (≥ 0.5.0), r2dii.match (≥ 0.3.0), r2dii.plot (≥ 0.4.0), readr (≥ 2.0.0), readxl, rlang, scales, tidyr, yaml, yesno |
Depends: | R (≥ 4.1.0) |
License: | MIT + file LICENSE |
RoxygenNote: | 7.3.2 |
Suggests: | DiagrammeR, gt, knitr, pkgdown, rmarkdown, usethis, testthat (≥ 3.1.9), tibble, withr, writexl |
Config/testthat/edition: | 3 |
Config/Needs/website: | rmi-pacta/pacta.pkgdown.rmitemplate |
VignetteBuilder: | knitr |
URL: | https://rmi-pacta.github.io/pacta.multi.loanbook/, https://github.com/RMI-PACTA/pacta.multi.loanbook/ |
LazyData: | true |
NeedsCompilation: | no |
Packaged: | 2025-01-08 13:47:09 UTC; jkastl |
Author: | Jacob Kastl |
Maintainer: | Jacob Kastl <jacob.kastl@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2025-01-09 14:00:01 UTC |
Analyse the loan book data sets used in the PACTA for Supervisors analysis
Description
analyse()
runs the necessary steps to analyse the matched loan books,
producing both the outputs of the standard PACTA analysis and the outputs of
the net aggregated alignment metric, including tables and plots. Parameters
for all steps are read from a config.yml
file. The function is called for
its side effects and writes the prepared and diagnosed data sets in the
directory specified by dir_analysis
in the config.yml
.
analyse()
and analyze()
are synonyms.
Usage
analyse(config)
analyze(config)
Arguments
config |
either a path to a config.yml file or a list of parameters |
Value
analyse()
returns NULL
invisibly. The function is called for its side
effects and writes the prepared and diagnosed data sets in the directory
specified by dir_analysis
in the config.yml
.
Examples
## Not run:
config <- "path/to/config.yml"
analyse(config)
## End(Not run)
Data dictionary
Description
An overview of the output data sets generated by the package, their data types, and the definitions of the variables.
Usage
data_dictionary
Format
data_dictionary
- dataset
Name of the dataset
- column
Name of the column
- typeof
Data type of the column
- definition
Description of what the column stands for
- value
Which values are allowed for the column
...
Details
For more details see the help vignette:
vignette("data_dictionary", package = "pacta.multi.loanbook")
Source
internal
Initialise a project directory and its config file
Description
initialise_default_project()
sets up a default project directory, including
a project directory, a default config.yml
configuration file, an input
sub-directory, and a loanbooks
sub-directory.
Usage
initialise_default_project(path = "project")
initialize_default_project(path = "project")
Arguments
path |
an absolute or relative path pointing to the location you would like the project directory to be created |
Value
initialise_default_project()
returns NULL
invisibly. The function is
called for its side effects of creating a default project directory at the
specified path.
Examples
## Not run:
project_dir <- "path/to/project"
initialise_default_project(project_dir)
## End(Not run)
Match raw input loan books with ABCD for PACTA for Supervisors analysis
Description
match_loanbooks()
runs the necessary steps to match the raw input loan
books with the asset based company data (ABCD) used in the PACTA for
Supervisors analysis. Specifically, it prepares matched loan books based on
name matching or direct identifiers, depending on the configuration. The
output matched loan books need to be manually validated for further
processing. Parameters for the matching step are read from a config.yml
file and follow the options available in r2dii.match::match_name
. The
function is called for its side effects and writes the prepared data sets to
the directory specified by dir_matched_loanbooks
in the config.yml
.
Usage
match_loanbooks(config)
Arguments
config |
either a path to a config.yml file or a list of parameters |
Value
match_loanbooks()
returns NULL
invisibly. The function is called for its
side effects and writes the prepared data sets to the directory specified by
dir_matched_loanbooks
in the config.yml
.
Examples
## Not run:
config <- "path/to/config.yml"
match_loanbooks(config)
## End(Not run)
Prepare input data sets for PACTA for Supervisors analysis
Description
prepare_abcd()
runs the necessary steps to prepare the input data sets for
the PACTA for Supervisors analysis. Specifically it prepares the abcd_final
data set by removing inactive companies if desired. And it allows preparing
the ratios by which the exposures to counterparties are split along the
sectors. Parameters for both steps are read from a config.yml
file. The
function is called for its side effects and writes the prepared data sets in
the directory specified by dir_prepared_abcd
in the config.yml
.
Usage
prepare_abcd(config)
Arguments
config |
either a path to a config.yml file or a list of parameters |
Value
prepare_abcd()
returns NULL
invisibly. The function is called for its
side effects and writes the prepared data sets in the directory specified by
dir_prepared_abcd
in the config.yml
.
Examples
## Not run:
config <- "path/to/config.yml"
prepare_abcd(config)
## End(Not run)
Prioritise and diagnose the loan book data sets used in the PACTA for Supervisors analysis
Description
prioritise_and_diagnose()
runs the necessary steps to prioritise the
matched loan books and diagnose both the match success rate and the coverage
of the real economy assets by the matched loan books. Parameters for all
steps are read from a config.yml
file. The function is called for its side
effects and writes the prepared and diagnosed data sets in the directory
specified by dir_prioritized_loanbooks_and_diagnostics
in the config.yml
.
prioritise_and_diagnose()
and prioritize_and_diagnose()
are synonyms.
Usage
prioritise_and_diagnose(config)
prioritize_and_diagnose(config)
Arguments
config |
either a path to a config.yml file or a list of parameters |
Value
prioritise_and_diagnose()
returns NULL
invisibly. The function is called
for its side effects and writes the prepared and diagnosed data sets in the
directory specified by dir_prioritized_loanbooks_and_diagnostics
in the
config.yml
.
Examples
## Not run:
config <- "path/to/config.yml"
prioritise_and_diagnose(config)
## End(Not run)