R/convertIMAGE.R

Defines functions convertIMAGE

convertIMAGE <- function(x) {
  w <- readSource("EDGAR", subtype = "HFC")
  w[is.na(w)] <- 0
  w <- dimSums(w[, 2005, ], dim = 3)["ATA", , , invert = TRUE]
  w <- w + 10^-10
  y <- toolAggregate(x, "regionmappingIMAGE.csv", weight = w)
  y <- toolCountryFill(y, fill = 0)
  return(y)
}
pik-piam/mrcommons documentation built on Dec. 8, 2024, 7:23 a.m.