fix_OAMR_gw | R Documentation |
Other Non-OECD Americas has several years (1971–1976)
in which Gas works gas is produced
but no feedstocks are consumed to
create the Gas works gas.
This function corrects that problem.
In particular, after calling this function,
Gas works
will consume Natural gas in all years, and
Natural gas production is boosted accordingly.
The efficiency of World Gas works plants plants in 1971-1976
was used to create the filled data.
This function uses data in the IEATools::Fixed_OAMR_gw
data frame.
fix_OAMR_gw(
.tidy_iea_df,
country = IEATools::iea_cols$country,
year = IEATools::iea_cols$year,
e_dot = IEATools::iea_cols$e_dot
)
.tidy_iea_df |
A tidy IEA data frame produced by |
country , year , e_dot |
See |
.tidy_iea_df
with improved Other non-OECD Americas Gas works.
library(dplyr)
example_tidy_iea_df <- load_tidy_iea_df() |>
dplyr::filter(Country == "ZAF", Year == 1971) |>
dplyr::mutate(
# Pretend that ZAF is Other non-OECD Americas.
Country = "OAMR"
)
example_tidy_iea_df
fixed <- example_tidy_iea_df |>
fix_OAMR_gw()
# Compare changed values
example_tidy_iea_df |>
dplyr::filter(Flow %in% c("Production",
"Gas works"),
Product %in% c("Gas works gas", "Natural gas")) |>
dplyr::select("Year", "Flow", "Product", "Edot", "Unit")
fixed %>%
dplyr::filter(Flow %in% c("Production",
"Gas works"),
Product %in% c("Gas works gas", "Natural gas")) |>
dplyr::select("Year", "Flow", "Product", "Edot", "Unit")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.