#' Converts BGR oil, gas, coal and uranium reserves data
#'
#' @param x MAgPIE object to be converted
#' @param subtype data subtype. Either "oil", "gas", "coal" or "uranium".
#' @return A MAgPIE object containing BGR (Federal Institute for Geosciences and
#' Natural Resources) country reserves disaggregated data of oil, gas, coal and uranium.
#' @author Renato Rodrigues
#' @examples
#' \dontrun{
#' a <- convertBGR(x, subtype = "oil")
#' }
#'
convertBGR <- function(x, subtype) {
# rename countries to REMIND iso codes
getItems(x, dim = 1) <- toolCountry2isocode(getItems(x, dim = 1))
x[is.na(x)] <- 0 # setting NA values to zero
x <- toolCountryFill(x, fill = 0, verbosity = 2) # fill countries with no data
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.