Convert Production Flows to Resource Flows
specify_production_to_resources.Rd
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 isIEATools::iea_cols$flow
.- product
The name of the product column in
.tidy_iea_df
. Default isIEATools::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 isIEATools::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 EnergyType LastStage Year LedgerSide FlowAggregationPoint
#> <chr> <chr> <chr> <chr> <dbl> <chr> <chr>
#> 1 GHA PCM E Final 1971 Consumption Industry
#> 2 GHA PCM E Final 1971 Consumption Industry
#> 3 GHA PCM E Final 1971 Consumption Industry
#> 4 GHA PCM E Final 1971 Consumption Industry
#> 5 GHA PCM E Final 1971 Consumption Industry
#> 6 GHA PCM E Final 1971 Consumption Industry
#> 7 GHA PCM E Final 1971 Consumption Industry
#> 8 GHA PCM E Final 1971 Consumption Non-energy use
#> 9 GHA PCM E Final 1971 Consumption Other
#> 10 GHA PCM E Final 1971 Consumption Other
#> # ℹ 423 more rows
#> # ℹ 4 more variables: Flow <chr>, Product <chr>, Unit <chr>, Edot <dbl>