fix_OAMR_cpp | R Documentation |
Other Non-OECD Americas has several years (1971–2010)
in which Charcoal is produced
but no Primary solid biofuels are consumed to
create the Charcoal.
This function corrects that problem.
In particular, after calling this function,
Charcoal production plants
now consume Primary solid biofuels in all years, and
Primary solid biofuels production is boosted accordingly.
The efficiency of Charcoal production plants in 2011
was used to create the filled data.
This function uses data in the IEATools::Fixed_OAMR_cpp
data frame.
fix_OAMR_cpp(
.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 Charcoal production plants.
library(dplyr)
example_tidy_iea_df <- load_tidy_iea_df() |>
dplyr::filter(Country == "GHA") |>
dplyr::mutate(
# Pretend that GHA is Other non-OECD Americas.
Country = "OAMR"
)
example_tidy_iea_df
fixed <- example_tidy_iea_df |>
fix_OAMR_cpp()
# Compare changed values
example_tidy_iea_df |>
dplyr::filter(Flow %in% c("Production",
"Charcoal production plants"),
Product %in% c("Charcoal", "Primary solid biofuels")) |>
dplyr::select("Year", "Flow", "Product", "Edot", "Unit")
fixed %>%
dplyr::filter(Flow %in% c("Production",
"Charcoal production plants"),
Product %in% c("Charcoal", "Primary solid biofuels")) |>
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.