Skip to content

Commit

Permalink
combine man pages of plot_* and prep_* function pairs (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyetman authored Sep 19, 2024
1 parent cc1dcaa commit 1241df8
Show file tree
Hide file tree
Showing 12 changed files with 137 additions and 215 deletions.
7 changes: 3 additions & 4 deletions R/prep_sankey.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#' Prepare data to plot using `plot_sankey()`
#'
#' @param data_alignment data.frame. Holds aggregated alignment metrics per
#' company for tms sectors. Must contain columns: `"name_abcd"`,
#' `"sector"` and any column implied by `group_var`.
Expand All @@ -12,10 +10,11 @@
#' plotted in sankey plot. Must be present in `data_alignment`.
#'
#' @return data.frame
#'
#' @export
#'
#' @examples
#' # TODO
#' @rdname plot_sankey

prep_sankey <- function(data_alignment,
region,
year,
Expand Down
7 changes: 3 additions & 4 deletions R/prep_scatter.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#' Prepare data to plot scatterplot
#'
#' @param data_bopo data.frame. Data containing buildout and phaseout alignment
#' values. Must contain columns: `'year'`, `'sector'`, `'region'`,
#' `'direction'` and either `'name_abcd'` and `'alignment_metric'` or
Expand All @@ -17,10 +15,11 @@
#' @param groups_to_plot Character vector. Groups to filter on.
#'
#' @return data.frame
#'
#' @export
#'
#' @examples
#' # TODO
#' @rdname plot_scatter

prep_scatter <- function(data_bopo,
data_net,
data_level = c("group_var", "company"),
Expand Down
7 changes: 3 additions & 4 deletions R/prep_scatter_alignment_exposure.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#' Prepare data to plot using `plot_scatter_alignment_exposure()`
#'
#' @param data data.frame. Holds net aggregated alignment metrics on the loan
#' book level. Must contain columns: `"scenario"`, `"region"`,
#' `"sector"`, `"year"`, `"exposure_weighted_net_alignment"`,
Expand All @@ -15,10 +13,11 @@
#' Defaults to `"benchmark"`.
#'
#' @return data.frame
#'
#' @export
#'
#' @examples
#' # TODO
#' @rdname plot_scatter_alignment_exposure

prep_scatter_alignment_exposure <- function(data,
year,
region,
Expand Down
7 changes: 3 additions & 4 deletions R/prep_scatter_animated.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#' Prepare data to plot animated scatterplot
#'
#' @param data_bopo data.frame. Data containing buildout and phaseout alignment
#' values. Must contain columns: `'year'`, `'sector'`, `'region'`,
#' `'direction'` and either `'name_abcd'` and `'alignment_metric'` or
Expand All @@ -15,10 +13,11 @@
#' @param groups_to_plot Character vector. Groups to filter on.
#'
#' @return data.frame
#'
#' @export
#'
#' @examples
#' # TODO
#' @rdname plot_scatter_animated

prep_scatter_animated <- function(data_bopo,
data_net,
data_level = c("group_var", "company"),
Expand Down
29 changes: 28 additions & 1 deletion man/plot_sankey.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 34 additions & 6 deletions man/plot_scatter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 31 additions & 6 deletions man/plot_scatter_alignment_exposure.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 32 additions & 5 deletions man/plot_scatter_animated.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 0 additions & 41 deletions man/prep_sankey.Rd

This file was deleted.

Loading

0 comments on commit 1241df8

Please sign in to comment.