Closed maurolepore closed 1 year ago
Relates to https://github.com/2DegreesInvesting/tiltIndicatorAfter/pull/55
We now have some toy_*()
datasets, and I plan to add more as needed.
library(tiltIndicator)
library(tiltIndicatorAfter)
toy_sector_profile_result() |> unnest_company()
#> # A tibble: 588 × 4
#> companies_id grouped_by risk_category value
#> <chr> <chr> <chr> <dbl>
#> 1 fleischerei-stiefsohn_00000005219477-001 ipr_1.5c rps_20… high 1
#> 2 fleischerei-stiefsohn_00000005219477-001 ipr_1.5c rps_20… medium 0
#> 3 fleischerei-stiefsohn_00000005219477-001 ipr_1.5c rps_20… low 0
#> 4 fleischerei-stiefsohn_00000005219477-001 ipr_1.5c rps_20… high 1
#> 5 fleischerei-stiefsohn_00000005219477-001 ipr_1.5c rps_20… medium 0
#> 6 fleischerei-stiefsohn_00000005219477-001 ipr_1.5c rps_20… low 0
#> 7 fleischerei-stiefsohn_00000005219477-001 weo_announced p… high 0
#> 8 fleischerei-stiefsohn_00000005219477-001 weo_announced p… medium 0
#> 9 fleischerei-stiefsohn_00000005219477-001 weo_announced p… low 1
#> 10 fleischerei-stiefsohn_00000005219477-001 weo_announced p… high 0
#> # ℹ 578 more rows
toy_sector_profile_upstream_result() |> unnest_company()
#> # A tibble: 14 × 4
#> companies_id grouped_by risk_category value
#> <chr> <chr> <chr> <dbl>
#> 1 fleischerei-stiefsohn_00000005219477-001 <NA> <NA> NA
#> 2 pecheries-basques_fra316541-00101 <NA> <NA> NA
#> 3 hoche-butter-gmbh_deu422723-693847001 <NA> <NA> NA
#> 4 hoche-butter-gmbh_deu422723-693847002 <NA> <NA> NA
#> 5 hoche-butter-gmbh_deu422723-693847003 <NA> <NA> NA
#> 6 vicquelin-espaces-verts_fra697272-00101 <NA> <NA> NA
#> 7 vicquelin-espaces-verts_fra697272-00102 <NA> <NA> NA
#> 8 vicquelin-espaces-verts_fra697272-00103 <NA> <NA> NA
#> 9 fleisohn_0000000492-001 <NA> <NA> NA
#> 10 bst-procontrol-gmbh_00000005104947-001 <NA> <NA> NA
#> 11 leider-gmbh_00000005064318-001 <NA> <NA> NA
#> 12 leider-gmbh_00000005064318-002 <NA> <NA> NA
#> 13 cheries-baqu_neu316541-00101 <NA> <NA> NA
#> 14 ca-coity-trg-aua-gmbh_00000384-001 <NA> <NA> NA
Closing until the need for more datasets arises.
Once we define the critical data (e.g. crucial columns) it'll help to create test-data constructors that are as minimal as possible.
Here is one silly example:
Created on 2023-09-21 with reprex v2.0.2
https://r-pkgs.org/testing-advanced.html#sec-testing-advanced-fixture-helper