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

Release/0.1.4 #430

Merged
merged 13 commits into from
Oct 17, 2023
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.RData
.Ruserdata
docs
revdep/
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: r2dii.match
Title: Tools to Match Corporate Lending Portfolios with Climate Data
Version: 0.1.3.9000
Version: 0.1.4
Authors@R:
c(person(given = "Alex",
family = "Axthelm",
Expand Down Expand Up @@ -54,7 +54,7 @@ Imports:
lifecycle,
magrittr,
purrr,
r2dii.data,
r2dii.data (>= 0.4.0),
rlang,
stringdist,
stringi,
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# r2dii.match (development version)
# r2dii.match 0.1.4

* `to_alias` can now handle strange encodings without error (#425, @kalashsinghal @Tilmon).

Expand Down
81 changes: 42 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,26 @@ and run fuzzy matching against all company names in the `abcd`:
``` r
match_result <- match_name(loanbook_demo, abcd_demo)
match_result
#> # A tibble: 410 × 28
#> id_loan id_direct_l…¹ name_…² id_in…³ name_…⁴ id_ul…⁵ name_…⁶ loan_…⁷ loan_…⁸
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <chr>
#> 1 L1 C294 Yuamen… <NA> <NA> UP15 Alpine… 225625 EUR
#> 2 L3 C292 Yuama … IP5 Yuama … UP288 Univer… 410297 EUR
#> 3 L3 C292 Yuama … IP5 Yuama … UP288 Univer… 410297 EUR
#> 4 L5 C305 Yukon … <NA> <NA> UP104 Garlan… 406585 EUR
#> 5 L5 C305 Yukon … <NA> <NA> UP104 Garlan… 406585 EUR
#> 6 L6 C304 Yukon … <NA> <NA> UP83 Earthp… 185721 EUR
#> 7 L6 C304 Yukon … <NA> <NA> UP83 Earthp… 185721 EUR
#> 8 L8 C303 Yueyan… <NA> <NA> UP163 Kraftw… 291513 EUR
#> 9 L9 C301 Yuedxi… IP10 Yuedxi… UP138 Jai Bh… 407513 EUR
#> 10 L10 C302 Yuexi … <NA> <NA> UP32 Bhagwa… 186649 EUR
#> # … with 400 more rows, 19 more variables: loan_size_credit_limit <dbl>,
#> # loan_size_credit_limit_currency <chr>, sector_classification_system <chr>,
#> # sector_classification_input_type <chr>,
#> # sector_classification_direct_loantaker <dbl>, fi_type <chr>,
#> # flag_project_finance_loan <chr>, name_project <lgl>,
#> # lei_direct_loantaker <lgl>, isin_direct_loantaker <lgl>, id_2dii <chr>,
#> # level <chr>, sector <chr>, sector_abcd <chr>, name <chr>, …
#> # A tibble: 26 × 28
#> id_direct_loantaker name_direct_loantaker id_intermediate_parent_1
#> <chr> <chr> <chr>
#> 1 C26 large oil and gas company four <NA>
#> 2 C26 large oil and gas company four <NA>
#> 3 C1 large automotive company five <NA>
#> 4 C1 large automotive company five <NA>
#> 5 C35 large steel company five <NA>
#> 6 C35 large steel company five <NA>
#> 7 C5 large automotive company two <NA>
#> 8 C5 large automotive company two <NA>
#> 9 C30 large power company five <NA>
#> 10 C30 large power company five <NA>
#> # ℹ 16 more rows
#> # ℹ 25 more variables: name_intermediate_parent_1 <chr>,
#> # id_ultimate_parent <chr>, name_ultimate_parent <chr>,
#> # loan_size_outstanding <dbl>, loan_size_outstanding_currency <chr>,
#> # loan_size_credit_limit <dbl>, loan_size_credit_limit_currency <chr>,
#> # sector_classification_system <chr>, sector_classification_input_type <chr>,
#> # sector_classification_direct_loantaker <dbl>, fi_type <chr>, …
```

### 2. Prioritize validated matches
Expand All @@ -92,26 +92,29 @@ matches, prioritizing (by default) `direct_loantaker` matches over

``` r
prioritize(match_result)
#> # A tibble: 216 × 28
#> id_loan id_direct_l…¹ name_…² id_in…³ name_…⁴ id_ul…⁵ name_…⁶ loan_…⁷ loan_…⁸
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <chr>
#> 1 L6 C304 Yukon … <NA> <NA> UP83 Earthp… 185721 EUR
#> 2 L13 C297 Yuba C… <NA> <NA> UP69 Consor… 200569 EUR
#> 3 L20 C287 Ytl Po… <NA> <NA> UP35 Bnb Re… 308217 EUR
#> 4 L21 C286 Ytl Po… <NA> <NA> UP63 Cisa S… 226553 EUR
#> 5 L22 C285 Ytl Co… <NA> <NA> UP187 Mr. La… 196857 EUR
#> 6 L23 C283 Ypic I… <NA> <NA> UP297 Wallen… 195929 EUR
#> 7 L24 C282 Ypfb C… <NA> <NA> UP209 Phoeni… 309145 EUR
#> 8 L25 C281 Ypf Sa <NA> <NA> UP296 Viridi… 266457 EUR
#> 9 L26 C280 Ypf En… <NA> <NA> UP67 Coast … 199641 EUR
#> 10 L27 C278 Younic… <NA> <NA> UP45 Ce Ene… 197785 EUR
#> # … with 206 more rows, 19 more variables: loan_size_credit_limit <dbl>,
#> # loan_size_credit_limit_currency <chr>, sector_classification_system <chr>,
#> # sector_classification_input_type <chr>,
#> # A tibble: 13 × 28
#> id_direct_loantaker name_direct_loantaker id_intermediate_parent_1
#> <chr> <chr> <chr>
#> 1 C26 large oil and gas company four <NA>
#> 2 C1 large automotive company five <NA>
#> 3 C35 large steel company five <NA>
#> 4 C5 large automotive company two <NA>
#> 5 C30 large power company five <NA>
#> 6 C3 large automotive company one <NA>
#> 7 C23 large hdv company three <NA>
#> 8 C33 large power company three <NA>
#> 9 C31 large power company four <NA>
#> 10 C32 large power company one <NA>
#> 11 C34 large power company two <NA>
#> 12 C25 large oil and gas company five <NA>
#> 13 C20 large coal company two <NA>
#> # ℹ 25 more variables: name_intermediate_parent_1 <chr>,
#> # id_ultimate_parent <chr>, name_ultimate_parent <chr>,
#> # loan_size_outstanding <dbl>, loan_size_outstanding_currency <chr>,
#> # loan_size_credit_limit <dbl>, loan_size_credit_limit_currency <chr>,
#> # sector_classification_system <chr>, sector_classification_input_type <chr>,
#> # sector_classification_direct_loantaker <dbl>, fi_type <chr>,
#> # flag_project_finance_loan <chr>, name_project <lgl>,
#> # lei_direct_loantaker <lgl>, isin_direct_loantaker <lgl>, id_2dii <chr>,
#> # level <chr>, sector <chr>, sector_abcd <chr>, name <chr>, …
#> # flag_project_finance_loan <chr>, name_project <chr>, …
```

The result is a dataset with identical columns to the input loanbook,
Expand Down
17 changes: 2 additions & 15 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
## Test environments

* ubuntu 20.04 (local), R-release
* ubuntu 18.04 (github actions), R 3.4, R 3.5, R-oldrel, R-release
* macOS-latest (github actions), R-release
* windows-latest (github actions), R-release
* win-builder, R-devel, R-release

## R CMD check results

0 errors | 0 warnings | 0 notes

## revdepcheck results

We checked 2 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
0 errors | 0 warnings | 1 note

* We saw 0 new problems
* We failed to check 0 packages
* Maintainer changed to Alex Axthelm while Jackson Hoffart is on extended leave.
2 changes: 1 addition & 1 deletion man/r2dii.match-package.Rd

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

60 changes: 30 additions & 30 deletions tests/testthat/_snaps/add_sector_and_borderline.md

Large diffs are not rendered by default.

Loading
Loading