You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the input portfolio, for example, only contains companies that operate in the power sector, the output should only contain data in the power sector.
Currently, the corporate_economy output contains all sectors. See reprex:
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, union
library(r2dii.data)
library(r2dii.analysis)
# a dummy matched file, with only one company in itmatched<-tibble::tribble(
~id_loan, ~id_direct_loantaker, ~name_direct_loantaker, ~id_intermediate_parent_1, ~name_intermediate_parent_1, ~id_ultimate_parent, ~name_ultimate_parent, ~loan_size_outstanding, ~loan_size_outstanding_currency, ~loan_size_credit_limit, ~loan_size_credit_limit_currency, ~sector_classification_system, ~sector_classification_input_type, ~sector_classification_direct_loantaker, ~fi_type, ~flag_project_finance_loan, ~name_project, ~lei_direct_loantaker, ~isin_direct_loantaker, ~id_2dii, ~level, ~sector, ~sector_ald, ~name, ~name_ald, ~score, ~source, ~borderline,
"L11", "C309", "Yuxi ounty Liuan dropower elopment C. L", NA, NA, "UP81", "Dynegy Midwest Generation, Inc.", 191289, "EUR", 18626259, "EUR", "NACE", "Code", 3511, "Loan", "No", NA, NA, NA, "UP81", "ultimate_parent", "power", "power", "Dynegy Midwest Generation, Inc.", "dynegy midwest generation, inc.", 1, "loanbook", FALSE
)
# this company is only exposed to coal (power sector)ald_demo %>%
filter(
name_company=="dynegy midwest generation, inc."
) %>%
select(technology) %>%
unique()
#> # A tibble: 1 x 1#> technology#> <chr> #> 1 coalcap# Adding "green" technologiesout<-matched %>%
target_market_share(
ald_demo,
scenario_demo_2020,
region_isos_demo
)
# output should only show power sector resultsout %>%
select(sector) %>%
unique()
#> # A tibble: 9 x 1#> sector #> <chr> #> 1 power #> 2 automotive #> 3 aviation #> 4 cement #> 5 coal #> 6 hdv #> 7 oil and gas#> 8 shipping #> 9 steel
If the input portfolio, for example, only contains companies that operate in the power sector, the output should only contain data in the power sector.
Currently, the
corporate_economy
output contains all sectors. See reprex:Created on 2021-07-06 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: