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 April 5, 2025, 12:31 p.m.