Skip to contents

Extract a data frame of electricity and heat output information

Usage

load_electricity_heat_output(
  .iea_file = NULL,
  electricity_output_prefix = IEATools::elec_heat_output$electricity_output_prefix,
  heat_output_prefix = IEATools::elec_heat_output$heat_output_prefix,
  country = IEATools::iea_cols$country,
  year = IEATools::iea_cols$year,
  flow = IEATools::iea_cols$flow,
  product = IEATools::iea_cols$product,
  e_dot = IEATools::iea_cols$e_dot,
  input_colname = IEATools::elec_heat_output$input_product,
  output_colname = IEATools::elec_heat_output$output_product,
  machine_colname = IEATools::template_cols$machine,
  unit_colname = IEATools::iea_cols$unit,
  unit = "TJ",
  electricity = "Electricity",
  output_machine_delimiter = IEATools::elec_heat_output$output_machine_delimiter,
  total = IEATools::memo_aggregation_product_prefixes$total,
  memo = IEATools::memo_aggregation_flow_prefixes$memo
)

Arguments

.iea_file

The IEA data file to read

electricity_output_prefix

The prefix for electricity output rows. Default is IEATools::elec_heat_output$electricity_output_prefix.

heat_output_prefix

The prefix for heat output rows. Default is IEATools::elec_heat_output$heat_output_prefix.

country, year, flow, product, e_dot, unit_colname

See IEATools::iea_cols.

input_colname, output_colname, output_machine_delimiter

See IEATools::elec_heat_output.

machine_colname

See IEATools::template_cols.

unit

The desired output unit. Default is "TJ". Best not to change this.

electricity

A string that defines electricity output. Default is "Electricity".

total

See IEATools::memo_aggregation_product_prefixes.

memo

See IEATools::memo_aggregation_flow_prefixes.

Value

A data frame of electricity and heat output data.

Examples

sample_iea_data_path() |> 
  load_electricity_heat_output()
#> # A tibble: 13 × 7
#>    Country  Year InputProduct             Machine     OutputProduct   Edot Unit 
#>    <chr>   <dbl> <chr>                    <chr>       <chr>          <dbl> <chr>
#>  1 GHA      2000 Crude oil                Main activ… Electricity   2.21e3 TJ   
#>  2 GHA      1971 Other oil products       Main activ… Electricity   1.26e2 TJ   
#>  3 GHA      1971 Hydro                    Main activ… Electricity   1.05e4 TJ   
#>  4 GHA      2000 Hydro                    Main activ… Electricity   2.38e4 TJ   
#>  5 ZAF      1971 Hard coal (if no detail) Main activ… Electricity   1.89e5 TJ   
#>  6 ZAF      2000 Other bituminous coal    Main activ… Electricity   6.60e5 TJ   
#>  7 ZAF      2000 Nuclear                  Main activ… Electricity   4.68e4 TJ   
#>  8 ZAF      1971 Hydro                    Main activ… Electricity   3.38e2 TJ   
#>  9 ZAF      2000 Hydro                    Main activ… Electricity   3.96e3 TJ   
#> 10 ZAF      1971 Hard coal (if no detail) Autoproduc… Electricity   6.87e3 TJ   
#> 11 ZAF      2000 Other bituminous coal    Autoproduc… Electricity   3.60e4 TJ   
#> 12 ZAF      2000 Primary solid biofuels   Autoproduc… Electricity   1.11e3 TJ   
#> 13 ZAF      1971 Hydro                    Autoproduc… Electricity   6.48e1 TJ