Skip to contents

Calulate Transition Risk Score at product level and company level

Usage

score_transition_risk(
  emissions_profile_at_product_level,
  sector_profile_at_product_level
)

Arguments

emissions_profile_at_product_level

Dataframe. Emissions profile product level output

sector_profile_at_product_level

Dataframe. Sector profile product level output

Value

A dataframe

See also

Other top-level functions: profile_emissions(), profile_sector(), transition_risk_profile()

Examples

library(dplyr)
library(readr, warn.conflicts = FALSE)
library(tiltToyData)

restore <- options(readr.show_col_types = FALSE)

emissions_companies <- read_csv(toy_emissions_profile_any_companies())
products <- read_csv(toy_emissions_profile_products_ecoinvent())
europages_companies <- read_csv(toy_europages_companies())
ecoinvent_activities <- read_csv(toy_ecoinvent_activities())
ecoinvent_europages <- read_csv(toy_ecoinvent_europages())
isic_name <- read_csv(toy_isic_name())

emissions_profile_at_product_level <- profile_emissions(
  companies = emissions_companies,
  co2 = products,
  europages_companies = europages_companies,
  ecoinvent_activities = ecoinvent_activities,
  ecoinvent_europages = ecoinvent_europages,
  isic = isic_name
) |> unnest_product()

sector_companies <- read_csv(toy_sector_profile_companies())
scenarios <- read_csv(toy_sector_profile_any_scenarios())

sector_profile_at_product_level <- profile_sector(
  companies = sector_companies,
  scenarios = scenarios,
  europages_companies = europages_companies,
  ecoinvent_activities = ecoinvent_activities,
  ecoinvent_europages = ecoinvent_europages,
  isic = isic_name
) |> unnest_product()

result <- score_transition_risk(emissions_profile_at_product_level, sector_profile_at_product_level)

result |> unnest_product()
#> # A tibble: 1,824 × 24
#>    companies_id    company_name country benchmark_tr_score transition_risk_score
#>    <chr>           <chr>        <chr>   <chr>                              <dbl>
#>  1 asteria_megalo… asteria_meg… austria 1.5C RPS_2030_all                  0.59 
#>  2 asteria_megalo… asteria_meg… austria 1.5C RPS_2050_all                  0.99 
#>  3 asteria_megalo… asteria_meg… austria NZ 2050_2030_all                   0.7  
#>  4 asteria_megalo… asteria_meg… austria NZ 2050_2050_all                   0.985
#>  5 asteria_megalo… asteria_meg… austria 1.5C RPS_2030_isi…                 0.59 
#>  6 asteria_megalo… asteria_meg… austria 1.5C RPS_2050_isi…                 0.99 
#>  7 asteria_megalo… asteria_meg… austria NZ 2050_2030_isic…                 0.7  
#>  8 asteria_megalo… asteria_meg… austria NZ 2050_2050_isic…                 0.985
#>  9 asteria_megalo… asteria_meg… austria 1.5C RPS_2030_til…                 0.59 
#> 10 asteria_megalo… asteria_meg… austria 1.5C RPS_2050_til…                 0.99 
#> # ℹ 1,814 more rows
#> # ℹ 19 more variables: profile_ranking <dbl>, reduction_targets <dbl>,
#> #   ep_product <chr>, activity_uuid_product_uuid <chr>,
#> #   matched_activity_name <chr>, matched_reference_product <chr>, unit <chr>,
#> #   multi_match <lgl>, matching_certainty <chr>,
#> #   matching_certainty_company_average <chr>, company_city <chr>,
#> #   postcode <chr>, address <chr>, main_activity <chr>, tilt_sector <chr>, …

result |> unnest_company()
#> # A tibble: 1,728 × 9
#>    companies_id                      company_name country benchmark_tr_score_avg
#>    <chr>                             <chr>        <chr>   <chr>                 
#>  1 asteria_megalotomusquinquespinos… asteria_meg… austria 1.5C RPS_2030_all     
#>  2 asteria_megalotomusquinquespinos… asteria_meg… austria 1.5C RPS_2050_all     
#>  3 asteria_megalotomusquinquespinos… asteria_meg… austria NZ 2050_2030_all      
#>  4 asteria_megalotomusquinquespinos… asteria_meg… austria NZ 2050_2050_all      
#>  5 asteria_megalotomusquinquespinos… asteria_meg… austria 1.5C RPS_2030_isic_4d…
#>  6 asteria_megalotomusquinquespinos… asteria_meg… austria 1.5C RPS_2050_isic_4d…
#>  7 asteria_megalotomusquinquespinos… asteria_meg… austria NZ 2050_2030_isic_4di…
#>  8 asteria_megalotomusquinquespinos… asteria_meg… austria NZ 2050_2050_isic_4di…
#>  9 asteria_megalotomusquinquespinos… asteria_meg… austria 1.5C RPS_2030_tilt_su…
#> 10 asteria_megalotomusquinquespinos… asteria_meg… austria 1.5C RPS_2050_tilt_su…
#> # ℹ 1,718 more rows
#> # ℹ 5 more variables: transition_risk_score_avg <dbl>, company_city <chr>,
#> #   postcode <chr>, address <chr>, main_activity <chr>

# Cleanup
options(restore)