Skip to contents

Final-to-useful industries should be named as "Industry -> Product". This function renames final-to-useful industries (in this case, species) to the desired form.

Usage

specify_fu_machines(
  .df,
  product = MWTools::mw_cols$product,
  stage = MWTools::mw_constants$stage_col,
  species = MWTools::mw_constants$species,
  final = MWTools::all_stages$final,
  useful = MWTools::all_stages$useful,
  product_notation = RCLabels::from_notation,
  machine_notation = RCLabels::arrow_notation
)

Arguments

.df

A data frame, likely the output of specify_useful_products().

product, stage, species

See MWTools::mw_constants.

final, useful

See MWTools::all_stages.

product_notation

The notation for products. Default is RCLabels::from_notation.

machine_notation

The notation for machines. Default is RCLabels::arrow_notation.

Value

A data frame in which final-to-useful machines are specified.

Examples

hmw_df <- hmw_test_data_path() %>%
  read.csv() %>%
  calc_hmw_pfu()
amw_df <- amw_test_data_path() %>%
  read.csv() %>%
  calc_amw_pfu()
specify_energy_type_method(hmw_df, amw_df) %>%
  specify_product() %>%
  MWTools::specify_primary_production() %>%
  specify_useful_products() %>%
  specify_fu_machines()
#> # A tibble: 4,392 × 10
#>    Country  Year Species       Stage Sector Unit    E.dot Energ…¹ Method Product
#>    <chr>   <dbl> <chr>         <chr> <chr>  <chr>   <dbl> <chr>   <chr>  <chr>  
#>  1 GBR      1960 Human females Final Agric… EJ    8.68e-4 E       PCM    Food   
#>  2 GBR      1960 Human females Final Indus… EJ    1.54e-2 E       PCM    Food   
#>  3 GBR      1960 Human females Final Servi… EJ    2.82e-2 E       PCM    Food   
#>  4 GBR      1960 Human females Prim… Agric… EJ    1.40e-3 E       PCM    Biomass
#>  5 GBR      1960 Human females Prim… Indus… EJ    2.48e-2 E       PCM    Biomass
#>  6 GBR      1960 Human females Prim… Servi… EJ    4.55e-2 E       PCM    Biomass
#>  7 GBR      1960 Human males   Final Agric… EJ    4.64e-3 E       PCM    Food   
#>  8 GBR      1960 Human males   Final Indus… EJ    5.69e-2 E       PCM    Food   
#>  9 GBR      1960 Human males   Final Servi… EJ    3.76e-2 E       PCM    Food   
#> 10 GBR      1960 Human males   Prim… Agric… EJ    7.49e-3 E       PCM    Biomass
#> # … with 4,382 more rows, and abbreviated variable name ¹​Energy.type