These functions wrap the output of the corresponding function in tiltIndicator.
Usage
profile_sector_upstream(
companies,
scenarios,
inputs,
europages_companies,
ecoinvent_activities,
ecoinvent_inputs,
ecoinvent_europages,
isic,
isic_tilt = lifecycle::deprecated(),
low_threshold = ifelse(scenarios$year == 2030, 1/9, 1/3),
high_threshold = ifelse(scenarios$year == 2030, 2/9, 2/3)
)
Arguments
- companies, scenarios, inputs
A dataframe like the dataset with a matching name in tiltToyData (see Reference).
- europages_companies
Dataframe. Companies from europages.
- ecoinvent_activities
Dataframe. Activities from ecoinvent.
- ecoinvent_inputs
Dataframe. Upstream products from ecoinvent.
- ecoinvent_europages
Dataframe. Mapper between europages and ecoinvent.
- isic
Dataframe. ISIC data.
- isic_tilt
- low_threshold
A numeric value to segment low and medium emission profile products.
- high_threshold
A numeric value to segment medium and high emission profile products.
Value
A data frame with the column companies_id
, and the list columns product
and company
holding the outputs at product and company level.
See also
Other top-level functions:
profile_emissions()
,
score_transition_risk()
,
transition_risk_profile()
Other profile functions:
profile_emissions()
,
profile_emissions_impl()
,
transition_risk_profile()
Examples
library(tiltToyData)
library(readr, warn.conflicts = FALSE)
restore <- options(readr.show_col_types = FALSE)
companies <- read_csv(toy_sector_profile_companies())
scenarios <- read_csv(toy_sector_profile_any_scenarios())
europages_companies <- read_csv(toy_europages_companies()) |> head(3)
ecoinvent_activities <- read_csv(toy_ecoinvent_activities()) |> head(3)
ecoinvent_europages <- read_csv(toy_ecoinvent_europages()) |> head(3)
isic_name <- read_csv(toy_isic_name()) |> head(3)
result <- profile_sector(
companies,
scenarios,
europages_companies = europages_companies,
ecoinvent_activities = ecoinvent_activities,
ecoinvent_europages = ecoinvent_europages,
isic = isic_name
)
#> Warning: Splitting `companies` into 4 chunks.
result |> unnest_product()
#> # A tibble: 304 × 28
#> companies_id company_name country sector_profile reduction_targets scenario
#> <chr> <chr> <chr> <chr> <dbl> <chr>
#> 1 antimonarchy_… NA NA medium 0.18 1.5C RPS
#> 2 antimonarchy_… NA NA high 0.98 1.5C RPS
#> 3 antimonarchy_… NA NA high 0.4 NZ 2050
#> 4 antimonarchy_… NA NA high 0.97 NZ 2050
#> 5 celestial_lov… NA NA medium 0.18 1.5C RPS
#> 6 celestial_lov… NA NA high 0.98 1.5C RPS
#> 7 celestial_lov… NA NA high 0.4 NZ 2050
#> 8 celestial_lov… NA NA high 0.97 NZ 2050
#> 9 nonphilosophi… NA NA low 0.09 1.5C RPS
#> 10 nonphilosophi… NA NA high 0.95 1.5C RPS
#> # ℹ 294 more rows
#> # ℹ 22 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 <chr>, address <chr>, main_activity <chr>,
#> # activity_uuid_product_uuid <chr>, isic_4digit <chr>, …
result |> unnest_company()
#> # A tibble: 1,152 × 13
#> companies_id company_name country sector_profile_share sector_profile
#> <chr> <chr> <chr> <dbl> <chr>
#> 1 antimonarchy_canine NA NA 0 high
#> 2 antimonarchy_canine NA NA 1 medium
#> 3 antimonarchy_canine NA NA 0 low
#> 4 antimonarchy_canine NA NA 0 NA
#> 5 antimonarchy_canine NA NA 1 high
#> 6 antimonarchy_canine NA NA 0 medium
#> 7 antimonarchy_canine NA NA 0 low
#> 8 antimonarchy_canine NA NA 0 NA
#> 9 antimonarchy_canine NA NA 1 high
#> 10 antimonarchy_canine NA NA 0 medium
#> # ℹ 1,142 more rows
#> # ℹ 8 more variables: scenario <chr>, year <dbl>,
#> # matching_certainty_company_average <chr>, company_city <chr>,
#> # postcode <chr>, address <chr>, main_activity <chr>,
#> # reduction_targets_avg <dbl>
companies <- read_csv(toy_sector_profile_upstream_companies())
scenarios <- read_csv(toy_sector_profile_any_scenarios())
inputs <- read_csv(toy_sector_profile_upstream_products())
europages_companies <- read_csv(toy_europages_companies()) |> head(3)
ecoinvent_activities <- read_csv(toy_ecoinvent_activities()) |> head(3)
ecoinvent_inputs <- read_csv(toy_ecoinvent_inputs()) |> head(3)
ecoinvent_europages <- read_csv(toy_ecoinvent_europages()) |> head(3)
isic_name <- read_csv(toy_isic_name()) |> head(3)
result <- profile_sector_upstream(
companies,
scenarios,
inputs,
europages_companies = europages_companies,
ecoinvent_activities = ecoinvent_activities,
ecoinvent_inputs = ecoinvent_inputs,
ecoinvent_europages = ecoinvent_europages,
isic = isic_name
)
#> Warning: Splitting `companies` into 4 chunks.
result |> unnest_product()
#> # A tibble: 436 × 32
#> companies_id company_name country sector_profile_upstr…¹ reduction_targets
#> <chr> <chr> <chr> <chr> <dbl>
#> 1 leathery_acorn… leathery_ac… germany medium 0.18
#> 2 leathery_acorn… leathery_ac… germany high 0.98
#> 3 leathery_acorn… leathery_ac… germany high 0.4
#> 4 leathery_acorn… leathery_ac… germany high 0.97
#> 5 warriorlike_gr… warriorlike… germany medium 0.18
#> 6 warriorlike_gr… warriorlike… germany high 0.98
#> 7 warriorlike_gr… warriorlike… germany high 0.4
#> 8 warriorlike_gr… warriorlike… germany high 0.97
#> 9 antimonarchy_c… NA NA medium 0.18
#> 10 antimonarchy_c… NA NA high 0.98
#> # ℹ 426 more rows
#> # ℹ abbreviated name: ¹sector_profile_upstream
#> # ℹ 27 more variables: scenario <chr>, year <dbl>, ep_product <chr>,
#> # matched_activity_name <chr>, matched_reference_product <chr>, unit <chr>,
#> # tilt_sector <chr>, multi_match <lgl>, matching_certainty <chr>,
#> # matching_certainty_company_average <chr>, input_name <chr>,
#> # input_unit <chr>, input_tilt_sector <chr>, input_tilt_subsector <chr>, …
result |> unnest_company()
#> # A tibble: 1,152 × 13
#> companies_id company_name country sector_profile_upstr…¹
#> <chr> <chr> <chr> <dbl>
#> 1 leathery_acornwoodpecker leathery_acornwoodpe… germany 0
#> 2 leathery_acornwoodpecker leathery_acornwoodpe… germany 1
#> 3 leathery_acornwoodpecker leathery_acornwoodpe… germany 0
#> 4 leathery_acornwoodpecker leathery_acornwoodpe… germany 0
#> 5 leathery_acornwoodpecker leathery_acornwoodpe… germany 1
#> 6 leathery_acornwoodpecker leathery_acornwoodpe… germany 0
#> 7 leathery_acornwoodpecker leathery_acornwoodpe… germany 0
#> 8 leathery_acornwoodpecker leathery_acornwoodpe… germany 0
#> 9 leathery_acornwoodpecker leathery_acornwoodpe… germany 1
#> 10 leathery_acornwoodpecker leathery_acornwoodpe… germany 0
#> # ℹ 1,142 more rows
#> # ℹ abbreviated name: ¹sector_profile_upstream_share
#> # ℹ 9 more variables: sector_profile_upstream <chr>, scenario <chr>,
#> # year <dbl>, matching_certainty_company_average <chr>, company_city <chr>,
#> # postcode <chr>, address <chr>, main_activity <chr>,
#> # reduction_targets_avg <dbl>
# Cleanup
options(restore)