View source: R/exemplar_functions.R
exemplar_lists | R Documentation |
An exemplar list is a list of countries or regions
that should be used to complete a country's
final-to-useful allocation table
or its efficiency table.
This function uses an exemplar table
(probably read by load_exemplar_table()
)
to create exemplar lists.
exemplar_lists( exemplar_table, countries = NULL, prev_names = PFUWorkflow::exemplar_names$prev_names, exemplar_country = PFUWorkflow::exemplar_names$exemplar_country, exemplars = PFUWorkflow::exemplar_names$exemplars, region_code = PFUWorkflow::exemplar_names$region_code, world = PFUWorkflow::exemplar_names$world, country = IEATools::iea_cols$country, year = IEATools::iea_cols$year, year_temp = ".year_temp", prev_names_list = ".prev_names_list" )
exemplar_table |
An exemplar table, probably read by |
countries |
The countries for which exemplar lists are desired. Default is |
exemplars, prev_names, exemplar_country, region_code, world |
See |
country, year |
See |
year_temp |
The name of a temporary year column. Default is ".year_temp". |
prev_names_list |
The name of a temporary column in |
The value of this function is a tibble with three columns: Country, Year, and Exemplars. Country contains 3-letter ISO country codes or names of world regions. Year contains years. Exemplars contains a list of countries or regions that should serve as exemplars for the country in that year.
Order in each of the exemplar lists is important, because countries and regions will be searched in the order they appear in the sub-list when searching for missing allocations and efficiencies.
A tibble containing countries and regions to be searched for missing final-to-useful allocation data or final-to-useful efficiency data.
# Use an exemplar table that is part of this package. el <- exemplar_lists(load_exemplar_table()) %>% # Montenegro is a particularly interesting case, as it had many name changes. # Look at the first year, the last year as Yugoslavia, the first year as Serbia, # and today. dplyr::filter(.data[[IEATools::iea_cols$country]] == "MNE", .data[[IEATools::iea_cols$year]] %in% c(1971, 1989, 1990, 2017)) el el[[1, "Exemplars"]] el[[2, "Exemplars"]] el[[3, "Exemplars"]] el[[4, "Exemplars"]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.