Skip to contents

Adds low and high thresholds for transition risk score

Usage

add_thresholds_transition_risk(co2, all_activities_scenario_sectors, scenarios)

Arguments

co2

A dataframe

all_activities_scenario_sectors

A dataframe

scenarios

A dataframe

Value

A dataframe.

Examples

library(tiltToyData)
library(readr)
library(dplyr)
#> 
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#> 
#>     filter, lag
#> The following objects are masked from ‘package:base’:
#> 
#>     intersect, setdiff, setequal, union
options(readr.show_col_types = FALSE)

co2 <- read_csv(toy_emissions_profile_products_ecoinvent())
all_activities_scenario_sectors <- read_csv(toy_all_activities_scenario_sectors())
scenarios <- read_csv(toy_sector_profile_any_scenarios())

output <- add_thresholds_transition_risk(
  co2,
  all_activities_scenario_sectors,
  scenarios
)
output
#> # A tibble: 72 × 8
#>    activity_uuid_product_uuid           grouped_by profile_ranking reductions
#>    <chr>                                <chr>                <dbl>      <dbl>
#>  1 bf94b5a7-b7a2-46d1-bb95-84bc560b12fb all                  0.667       0.22
#>  2 bf94b5a7-b7a2-46d1-bb95-84bc560b12fb all                  0.667       0.96
#>  3 bf94b5a7-b7a2-46d1-bb95-84bc560b12fb all                  0.667       0.23
#>  4 bf94b5a7-b7a2-46d1-bb95-84bc560b12fb all                  0.667       0.94
#>  5 833caa78-30df-4374-900f-7f88ab44075b all                  0.333       0.09
#>  6 833caa78-30df-4374-900f-7f88ab44075b all                  0.333       0.95
#>  7 833caa78-30df-4374-900f-7f88ab44075b all                  0.333       0.22
#>  8 833caa78-30df-4374-900f-7f88ab44075b all                  0.333       0.96
#>  9 76269c17-78d6-420b-991a-aa38c51b45b7 all                  1           0.18
#> 10 76269c17-78d6-420b-991a-aa38c51b45b7 all                  1           0.98
#> # ℹ 62 more rows
#> # ℹ 4 more variables: transition_risk_score <dbl>, benchmark_tr_score <chr>,
#> #   transition_risk_low_threshold <dbl>, transition_risk_high_threshold <dbl>