Skip to content

Commit

Permalink
use config for target year, not magic number (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobvjk authored Oct 30, 2024
1 parent c090b58 commit c319a90
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/plot_aggregate_loanbooks.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ plot_aggregate_loanbooks <- function(config) {
data_sankey_sector <- prep_sankey(
company_aggregated_alignment_net,
region = "global",
year = 2027,
year = start_year + time_frame_select,
group_var = by_group,
middle_node = "sector"
)
Expand Down Expand Up @@ -177,7 +177,7 @@ plot_aggregate_loanbooks <- function(config) {
data_sankey_company_sector <- prep_sankey(
company_aggregated_alignment_net,
region = "global",
year = 2027,
year = start_year + time_frame_select,
group_var = by_group,
middle_node = "name_abcd",
middle_node2 = "sector"
Expand Down Expand Up @@ -214,7 +214,7 @@ plot_aggregate_loanbooks <- function(config) {
}

### scatter plot alignment by exposure and sector comparison----
year_scatter_alignment_exposure <- 2027
year_scatter_alignment_exposure <- start_year + time_frame_select
region_scatter_alignment_exposure <- region_select
currency <- unique(company_aggregated_alignment_net[["loan_size_outstanding_currency"]])
if (length(by_group) <= 1) {
Expand Down Expand Up @@ -269,7 +269,7 @@ plot_aggregate_loanbooks <- function(config) {


### scatter plot for group level comparison----
year_scatter <- 2027
year_scatter <- start_year + time_frame_select
region_scatter <- region_select
data_level_group <- "group_var"
# automotive
Expand Down Expand Up @@ -405,7 +405,7 @@ plot_aggregate_loanbooks <- function(config) {
# for all companies per group, not all companies across groups

# company level, excluding outliers
year_scatter <- 2027
year_scatter <- start_year + time_frame_select
region_scatter <- region_select
data_level_company <- "company"

Expand Down

0 comments on commit c319a90

Please sign in to comment.