Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider adding a few minor included datasets to the data dictionary #275

Open
cjyetman opened this issue Nov 29, 2024 · 0 comments
Open

Comments

@cjyetman
Copy link
Member

cjyetman commented Nov 29, 2024

A few inline todos in vignettes/cookbook_preparatory_steps.Rmd have been replaced by this issue.

There are a few minor included datasets that we should consider adding to the "Understanding the data" data dictionary vignette.

  • ABCD data set columns: pacta.multi.loanbook:::cols_abcd

    # expected columns abcd file (raw and final)
    cols_abcd <- c(
    "company_id",
    "name_company",
    "lei",
    "is_ultimate_owner",
    "sector",
    "technology",
    "plant_location",
    "year",
    "production",
    "production_unit",
    "emission_factor",
    "emission_factor_unit"
    )

  • target market share scenario data set columns: pacta.multi.loanbook:::col_types_scenario_tms[["cols"]]

    # expected columns tms scenario file
    col_types_scenario_tms <- readr::cols_only(
    scenario_source = "c",
    region = "c",
    scenario = "c",
    sector = "c",
    technology = "c",
    year = "i",
    smsp = "n",
    tmsr = "n"
    )
    col_select_scenario_tms <- names(col_types_scenario_tms[["cols"]])

  • SDA scenario data set columns: pacta.multi.loanbook:::col_types_scenario_sda[["cols"]]

    # expected columns sda scenario file
    col_types_scenario_sda <- readr::cols_only(
    scenario_source = "c",
    region = "c",
    scenario = "c",
    sector = "c",
    year = "i",
    emission_factor = "n",
    emission_factor_unit = "c"
    )
    col_select_scenario_sda <- names(col_types_scenario_sda[["cols"]])

  • Raw loanbook columns: pacta.multi.loanbook:::col_types_raw[["cols"]]

    # expected columns raw loan book file
    col_types_raw <- readr::cols(
    id_loan = "c",
    id_direct_loantaker = "c",
    name_direct_loantaker = "c",
    id_ultimate_parent = "c",
    name_ultimate_parent = "c",
    loan_size_outstanding = "n",
    loan_size_outstanding_currency = "c",
    loan_size_credit_limit = "n",
    loan_size_credit_limit_currency = "c",
    sector_classification_system = "c",
    sector_classification_direct_loantaker = "c",
    lei_direct_loantaker = "c",
    isin_direct_loantaker = "c"
    )
    col_select_raw <- names(col_types_raw[["cols"]])

original inline todos:

The ABCD data set must be an XLSX file and contains the following columns:
```{r cols_abcd, echo = FALSE, results = 'asis'}
# TODO: should this be in the data dictionary?
cat(paste0("- `", pacta.multi.loanbook:::cols_abcd, "`", collapse = "\n"))
```

The target market share scenario data set must be a CSV file and contains the following columns:
```{r cols_tms_scenario, echo = FALSE, results = 'asis'}
# TODO: should this be in the data dictionary?
cat(paste0("- `", names(pacta.multi.loanbook:::col_types_scenario_tms[["cols"]]), "`", collapse = "\n"))
```

The SDA scenario data set must be a CSV file and contains the following columns:
```{r cols_sda_scenario, echo = FALSE, results = 'asis'}
# TODO: should this be in the data dictionary?
cat(paste0("- `", names(pacta.multi.loanbook:::col_types_scenario_sda[["cols"]]), "`", collapse = "\n"))
```

The raw loan books must be prepared as CSV files and contain at a minimum the following columns:
```{r cols_raw_loanbooks, echo = FALSE, results = 'asis'}
# TODO: should this be in the data dictionary?
cat(paste0("- `", names(pacta.multi.loanbook:::col_types_raw[["cols"]]), "`", collapse = "\n"))
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant