convertREMMAG <- function(x, subtype) {
map <- toolGetMapping(type = "regional", name = "regionmappingMAgPIE.csv", where = "mappingfolder")
if (subtype == "ghgprices") {
y <- toolAggregate(x, map)
} else if (subtype == "biodem") {
pop <- calcOutput("Population", aggregate = FALSE)
y <- toolAggregate(x, map, weight = pop[, 2010, 1])
} else {
stop("Unknown subtype ", subtype)
}
return(y)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.