Skip to contents

The IEA gives resource extraction in rows where the Flow is "Production". This function changes the "Production" string to "Resources [of Product]", where product is the name of the energy carrier for this resource.

Usage

specify_production_to_resources(
  .tidy_iea_df,
  flow = IEATools::iea_cols$flow,
  product = IEATools::iea_cols$product,
  production = IEATools::tpes_flows$production,
  resources = IEATools::tpes_flows$resources,
  notation = RCLabels::from_notation
)

Arguments

.tidy_iea_df

An IEA data frame whose columns have been renamed by rename_iea_df_cols()

flow

The name of the flow column in .tidy_iea_df. Default is IEATools::iea_cols$flow.

product

The name of the product column in .tidy_iea_df. Default is IEATools::iea_cols$product.

production

A string identifying production in the flow column. Default is IEATools::tpes_flows$production.

resources

A string identifying resource industries to be added to .tidy_iea_df. Default is IEATools::tpes_flows$resources.

notation

A list of specification notations. Default is IEATools::bracket_notation.

Value

A .tidy_iea_df with Production changed to resources .resources_open product .resources_close in the flow column

Details

This function should be called after specify_primary_production(), which adjusts for energy industry own use of some primary energy producing industries. If this function is called first, EIOU will not be accounted correctly.

Examples

load_tidy_iea_df() %>% 
  specify_primary_production() %>% 
  specify_production_to_resources()
#> # A tibble: 433 × 11
#>    Country Method Energy.type Last.stage  Year Ledger.side
#>    <chr>   <chr>  <chr>       <chr>      <dbl> <chr>      
#>  1 GHA     PCM    E           Final       1971 Consumption
#>  2 GHA     PCM    E           Final       1971 Consumption
#>  3 GHA     PCM    E           Final       1971 Consumption
#>  4 GHA     PCM    E           Final       1971 Consumption
#>  5 GHA     PCM    E           Final       1971 Consumption
#>  6 GHA     PCM    E           Final       1971 Consumption
#>  7 GHA     PCM    E           Final       1971 Consumption
#>  8 GHA     PCM    E           Final       1971 Consumption
#>  9 GHA     PCM    E           Final       1971 Consumption
#> 10 GHA     PCM    E           Final       1971 Consumption
#> # ℹ 423 more rows
#> # ℹ 5 more variables: Flow.aggregation.point <chr>, Flow <chr>, Product <chr>,
#> #   Unit <chr>, E.dot <dbl>