Skip to contents

Adds an electricity grid industry that takes as input all electricity produced by any industry, which is now specified by producing industry (e.g., "Electricity [from Wind power plants]"), and converts it into Electricity.

Usage

specify_electricity_grid(
  .tidy_iea_df,
  specify_electricity_grid = FALSE,
  supplying_industry_notation = RCLabels::from_notation,
  country = IEATools::iea_cols$country,
  method = IEATools::iea_cols$method,
  energy_type = IEATools::iea_cols$energy_type,
  last_stage = IEATools::iea_cols$last_stage,
  year = IEATools::iea_cols$year,
  ledger_side = IEATools::iea_cols$ledger_side,
  flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
  flow = IEATools::iea_cols$flow,
  product = IEATools::iea_cols$product,
  unit = IEATools::iea_cols$unit,
  e_dot = IEATools::iea_cols$e_dot,
  losses = IEATools::tfc_compare_flows$losses,
  grid_industry = IEATools::grid_industries$electricity_grid,
  supply = IEATools::ledger_sides$supply,
  transformation_processes = IEATools::tfc_compare_flows$transformation_processes,
  electricity = IEATools::electricity_products$electricity,
  negzeropos = ".negzeropos"
)

Arguments

.tidy_iea_df

The .tidy__iea_df for which an electricity grid industry should be added.

specify_electricity_grid

A boolean stating whether an electricity grid industry should be created or not. Default is FALSE.

supplying_industry_notation

Notation to use to specify the electricity supplying industry. Default is RCLabels::from_notation.

flow_aggregation_point, flow, e_dot, product, method, ledger_side, last_stage, energy_type, country, year, unit

See IEATools::iea_cols.

losses

The name of the "Losses" flows in the input data frame. Default is IEATools::tfc_compare_flows$losses.

grid_industry

The name of the electricity grid industry to be added. Default is IEATools::grid_industries$electricity_grid.

supply

The name of the supply ledger side. Default is IEATools::ledger_sides$supply.

transformation_processes

The name of transformation processes in the flow aggregation point column. Default is IEATools::tfc_compare_flows$transformation_processes.

electricity

The name of the product name for "Electricity". Default is IEATools::electricity_products$electricity.

negzeropos

The name of a temporary column added to the data frame. Default is ".negzeropos".

Value

The .tidy__iea_df to which an electricity grid industry has been added.

Examples

load_tidy_iea_df() %>% 
  specify_electricity_grid()
#> # A tibble: 403 × 11
#>    Country Method EnergyType LastStage  Year LedgerSide FlowAggregationPoint    
#>    <chr>   <chr>  <chr>      <chr>     <dbl> <chr>      <chr>                   
#>  1 GHA     PCM    E          Final      1971 Supply     Total primary energy su…
#>  2 GHA     PCM    E          Final      2000 Supply     Total primary energy su…
#>  3 GHA     PCM    E          Final      1971 Supply     Total primary energy su…
#>  4 GHA     PCM    E          Final      2000 Supply     Total primary energy su…
#>  5 GHA     PCM    E          Final      1971 Supply     Total primary energy su…
#>  6 GHA     PCM    E          Final      2000 Supply     Total primary energy su…
#>  7 GHA     PCM    E          Final      2000 Supply     Total primary energy su…
#>  8 GHA     PCM    E          Final      2000 Supply     Total primary energy su…
#>  9 GHA     PCM    E          Final      1971 Supply     Total primary energy su…
#> 10 GHA     PCM    E          Final      2000 Supply     Total primary energy su…
#> # ℹ 393 more rows
#> # ℹ 4 more variables: Flow <chr>, Product <chr>, Unit <chr>, Edot <dbl>