Composable friends
Source:R/profile_emissions.R
, R/profile_emissions_upstream.R
, R/profile_impl.R
, and 2 more
profile_impl.Rd
These functions are designed to work well together. Each does something small. Compose them to create complex results.
Usage
profile_emissions_impl(
companies,
co2,
europages_companies,
ecoinvent_activities,
ecoinvent_europages,
isic,
isic_tilt = lifecycle::deprecated(),
low_threshold = 1/3,
high_threshold = 2/3
)
profile_emissions_upstream_impl(
companies,
co2,
europages_companies,
ecoinvent_activities,
ecoinvent_inputs,
ecoinvent_europages,
isic,
isic_tilt = lifecycle::deprecated(),
low_threshold = 1/3,
high_threshold = 2/3
)
profile_sector_impl(
companies,
scenarios,
europages_companies,
ecoinvent_activities,
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)
)
profile_sector_upstream_impl(
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)
)
See also
Other profile functions:
profile_emissions()
,
profile_sector()
Examples
library(readr, warn.conflicts = FALSE)
library(tiltToyData)
restore <- options(list(
readr.show_col_types = FALSE,
tiltIndicatorAfter.output_co2_footprint = TRUE
))
companies <- read_csv(toy_emissions_profile_any_companies())
co2 <- 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())
result <- profile_emissions_impl(
companies,
co2,
europages_companies = europages_companies,
ecoinvent_activities = ecoinvent_activities,
ecoinvent_europages = ecoinvent_europages,
isic = isic_name
)
result
#> # A tibble: 72 × 3
#> companies_id product company
#> * <chr> <list> <list>
#> 1 asteria_megalotomusquinquespinosus <tibble [6 × 24]> <tibble>
#> 2 skarn_gallinule <tibble [6 × 24]> <tibble>
#> 3 relegable_southernhairnosedwombat <tibble [6 × 24]> <tibble>
#> 4 psychodelic_airedale <tibble [6 × 24]> <tibble>
#> 5 ergophilic_fieldspaniel <tibble [6 × 24]> <tibble>
#> 6 preexistent_africanmolesnake <tibble [6 × 24]> <tibble>
#> 7 wealthy_ocelot <tibble [6 × 24]> <tibble>
#> 8 fulltime_mollusk <tibble [6 × 24]> <tibble>
#> 9 gentlemanlike_asiaticlesserfreshwaterclam <tibble [6 × 24]> <tibble>
#> 10 frowsy_metalmarkbutterfly <tibble [6 × 24]> <tibble>
#> # ℹ 62 more rows
# Cleanup
options(restore)