-
Notifications
You must be signed in to change notification settings - Fork 1
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
Sector_profile
indicator do not output isic_4digit
column at product level.
#634
Comments
I think the feature you want is already implemented in tiltIndicatorAfter, right? This reprex comes from the helpfile of library(tiltToyData)
library(tiltIndicator)
library(tiltIndicatorAfter)
library(dplyr, warn.conflicts = FALSE)
library(readr, warn.conflicts = FALSE)
options(readr.show_col_types = FALSE)
companies <- read_csv(toy_sector_profile_companies())
scenarios <- read_csv(toy_sector_profile_any_scenarios())
result <- profile_sector(
companies,
scenarios,
# TODO: Move to tiltToyData
europages_companies = ep_companies |> head(3),
ecoinvent_activities = ecoinvent_activities |> head(3),
ecoinvent_europages = matches_mapper |> head(3)
)
result |>
unnest_product() |>
relocate(matches("isic"))
#> # A tibble: 196 × 27
#> isic_4digit companies_id company_name country PSTR_risk_category scenario
#> <dbl> <chr> <chr> <chr> <chr> <chr>
#> 1 2410 fleischerei-sti… <NA> <NA> high IPR 1.5…
#> 2 2410 fleischerei-sti… <NA> <NA> high IPR 1.5…
#> 3 2410 fleischerei-sti… <NA> <NA> low stated …
#> 4 2410 fleischerei-sti… <NA> <NA> low announc…
#> 5 2410 fleischerei-sti… <NA> <NA> low net zer…
#> 6 2410 fleischerei-sti… <NA> <NA> low stated …
#> 7 2410 fleischerei-sti… <NA> <NA> low announc…
#> 8 2410 fleischerei-sti… <NA> <NA> high net zer…
#> 9 2410 fleischerei-sti… <NA> <NA> low stated …
#> 10 2410 fleischerei-sti… <NA> <NA> medium announc…
#> # ℹ 186 more rows
#> # ℹ 21 more variables: year <dbl>, ep_product <chr>,
#> # matched_activity_name <chr>, matched_reference_product <chr>, unit <chr>,
#> # tilt_sector <chr>, tilt_subsector <chr>, multi_match <lgl>,
#> # matching_certainty <chr>, matching_certainty_company_average <chr>,
#> # company_city <chr>, postcode <dbl>, address <chr>, main_activity <chr>,
#> # activity_uuid_product_uuid <chr>, profile_ranking <dbl>, … Created on 2023-12-04 with reprex v2.0.2 |
BTW, this duplicates #631 (comment). |
@maurolepore Apologies! I forgot that this column was added through the companies and product datasets for both indicators in tiltIndicatorAfter. Thanks for closing! |
Remember tiltIndicatorAfter wraps tiltIndicator. So tiltIndicator should not be called directly. If you're working on workflow files, all you need is the new API of tiltIndicatorAfter -- i.e. the https://2degreesinvesting.github.io/tiltIndicatorAfter/reference/index.html From the changelog
|
@maurolepore Thanks for mentioning this! I will use them instead :) |
Dear @maurolepore
I noticed that the final output from
Sector_profile
do not output theisic_4digit
column. Please have a look at the reprex:Created on 2023-12-04 with reprex v2.0.2
Please add this column for both
sector_profile
andsector_profile_upstream
indicators at product level. Thanks!The text was updated successfully, but these errors were encountered: