Skip to content

Commit

Permalink
Merge pull request #405 from whitehacker/master
Browse files Browse the repository at this point in the history
Adding value to where in toolGetMapping
  • Loading branch information
whitehacker authored Jul 3, 2023
2 parents 2eed46a + 7e18f48 commit 623de95
Show file tree
Hide file tree
Showing 70 changed files with 164 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '32027560'
ValidationKey: '32076470'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'mrremind: MadRat REMIND Input Data Package'
version: 0.164.0
date-released: '2023-06-21'
version: 0.164.2
date-released: '2023-06-27'
abstract: The mrremind packages contains data preprocessing for the REMIND model.
authors:
- family-names: Baumstark
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: mrremind
Title: MadRat REMIND Input Data Package
Version: 0.164.0
Date: 2023-06-21
Version: 0.164.2
Date: 2023-06-27
Authors@R: c(
person("Lavinia", "Baumstark", , "[email protected]", role = c("aut", "cre")),
person("Renato", "Rodrigues", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion R/calcAGEB.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
calcAGEB <- function(subtype = "balances") {
ageb <- readSource("AGEB", subtype = subtype)

mapping <- toolGetMapping("Mapping_AGEB_REMIND.csv", type = "reportingVariables") %>%
mapping <- toolGetMapping("Mapping_AGEB_REMIND.csv", type = "reportingVariables", where = "mappingfolder") %>%
mutate(!!sym("conversion") := as.numeric(!!sym("Factor")) * !!sym("Weight")) %>%
select("variable" = "AGEB_variable", "REMIND_variable", "conversion", "unit" = "Unit_AGEB", "Unit_REMIND") %>%
filter(!!sym("REMIND_variable") != "")
Expand Down
2 changes: 1 addition & 1 deletion R/calcBP.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

calcBP <- function() {
.readFactors <- function() {
factors <- toolGetMapping("BP_Renewable_Efficiency_Factors.csv", type = "sectoral")
factors <- toolGetMapping("BP_Renewable_Efficiency_Factors.csv", type = "sectoral", where = "mappingfolder")
colnames(factors) <- c("year", "factor")
factors <- rbind(
factors,
Expand Down
3 changes: 2 additions & 1 deletion R/calcCapTarget.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ calcCapTarget <- function(sources) {
# hydrogen capacity targets from national/EU hydrogen strategies

# Region targets
reg.map <- toolGetMapping("regionmappingH12.csv", type = "regional") # get H12 regionmapping
reg.map <- toolGetMapping("regionmappingH12.csv", type = "regional",
where = "mappingfolder") # get H12 regionmapping
H2Target.reg <- new.magpie(unique(reg.map$RegionCode), getYears(x), "elh2", fill = 0)
# Electrolyzer capacity target from the EU Hydrogen Strategy
# https://ec.europa.eu/energy/sites/ener/files/hydrogen_strategy.pdf
Expand Down
2 changes: 1 addition & 1 deletion R/calcCapacityFactor.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ calcCapacityFactor <- function(){
# Read generation data from Energy Balances
coalgen_c <- calcOutput("IO",subtype="output",aggregate = F)[,,"pecoal.seel"]
coalgen_c <- dimSums(coalgen_c,dim=3)
map <- toolGetMapping(getConfig("regionmapping"),type="regional")
map <- toolGetMapping(getConfig("regionmapping"),type="regional", where = "mappingfolder")
coalgen_R <- toolAggregate(coalgen_c,map,weight=NULL)
getNames(coalgen_c) <- "pc"
getNames(coalgen_R) <- "pc"
Expand Down
2 changes: 1 addition & 1 deletion R/calcCapital.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ calcCapital <- function(subtype = "Capital") {
for(r in getRegions(cap_intensity_future)) {
if(cap_intensity_future[r,t,"gdp_SSP2"]==0) {
# get current mapping
map <- toolGetMapping(type = "regional", name = getConfig("regionmapping"))
map <- toolGetMapping(type = "regional", name = getConfig("regionmapping"), where = "mappingfolder")
# get list of countries that belong to the same region as r
regi <- map$RegionCode[map$CountryCode==r]
c_regi <- map$CountryCode[map$RegionCode==regi]
Expand Down
2 changes: 1 addition & 1 deletion R/calcCementShare.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ calcCementShare <- function() {

list(x = bind_rows(
left_join(
toolGetMapping('regionmappingOECD.csv', 'regional') %>%
toolGetMapping('regionmappingOECD.csv', 'regional', where = "mappingfolder") %>%
as_tibble() %>%
select(iso3c = 'CountryCode', region = 'RegionCode'),

Expand Down
5 changes: 2 additions & 3 deletions R/calcChemicalFeedstocksShare.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ calcChemicalFeedstocksShare <- function()
{
region_mapping <- toolGetMapping(
name = 'regionmapping_21_EU11.csv',
type = 'regional') %>%
type = 'regional', where = "mappingfolder") %>%
as_tibble() %>%
select(region = 'RegionCode', iso3c = 'CountryCode')

OECD_iso3c <- toolGetMapping(name = 'regionmappingOECD.csv',
type = 'regional') %>%
OECD_iso3c <- toolGetMapping(name = 'regionmappingOECD.csv', type = 'regional', where = "mappingfolder") %>%
as_tibble() %>%
select(iso3c = 'CountryCode', region = 'RegionCode') %>%
filter('OECD' == .data$region) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/calcCoolingSharesBase.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ calcCoolingSharesBase <- function() {
# read in mapping to REMIND technologies
map_table <- read_excel(toolGetMapping(type = "sectoral",
name = "TechnologyMappingDavies2REMIND.xlsx",
returnPathOnly = TRUE))
returnPathOnly = TRUE, where = "mappingfolder"))
map <- list()
map$davies <- paste(map_table$'Davies Source/Technology',map_table$'Davies Cooling',sep=".")
map$remind <- paste(map_table$'REMIND Technology',map_table$'REMIND Cooling',sep=".")
Expand Down
2 changes: 1 addition & 1 deletion R/calcCoolingSharesFuture.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ calcCoolingSharesFuture <- function() {

# read in mapping to REMIND technologies
map_table <- read_excel(toolGetMapping(type = "sectoral", name = "TechnologyMappingDavies2REMIND.xlsx",
returnPathOnly = TRUE))
returnPathOnly = TRUE, where = "mappingfolder"))
map <- list()
map$davies <- paste(map_table$'Davies Source/Technology',map_table$'Davies Cooling',sep=".")
map$remind <- paste(map_table$'REMIND Technology',map_table$'REMIND Cooling',sep=".")
Expand Down
5 changes: 3 additions & 2 deletions R/calcEEAGHGProjections.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' @export

calcEEAGHGProjections <- function() {
mapping <- toolGetMapping(type = "sectoral", name = "mappingEEAGHGProjections.csv")
mapping <- toolGetMapping(type = "sectoral", name = "mappingEEAGHGProjections.csv", where = "mappingfolder")
eea <- readSource("EEA_EuropeanEnvironmentAgency", subtype = "projections")

projectionsOverview <- as.data.frame(eea) %>%
Expand All @@ -40,7 +40,8 @@ calcEEAGHGProjections <- function() {
)

eeaDetail <- readSource("EEA_EuropeanEnvironmentAgency", subtype = "projections-detailed")
mappingDetailed <- toolGetMapping(type = "sectoral", name = "mappingEEAGHGProjectionsDetailed.csv")
mappingDetailed <- toolGetMapping(type = "sectoral", name = "mappingEEAGHGProjectionsDetailed.csv",
where = "mappingfolder")

projectionsDetail <- as.data.frame(eeaDetail) %>%
filter(!is.na(!!sym("Value"))) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/calcEconometricEmiParameter.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ calcEconometricEmiParameter <- function() {
pop <- calcOutput("Population", aggregate = FALSE)[, 2005, "pop_SSP2"] / 1000

p3Country <- dimSums(edgar[, , c("2A1", "2A2")], dim = 3) / pop
mapping <- toolGetMapping(type = "regional", name = "regionmappingEconometricEmi.csv")
mapping <- toolGetMapping(type = "regional", name = "regionmappingEconometricEmi.csv", where = "mappingfolder")
p3 <- toolAggregate(p3Country[unique(mapping$RepCountry), , ], mapping, weight = NULL)
p3[is.na(p3)] <- 0
getNames(p3) <- "co2cement_process.p3"
Expand Down
2 changes: 1 addition & 1 deletion R/calcEffortSharingRefEmi.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ calcEffortSharingRefEmi <- function(subtype){

} else if (subtype=="REMIND_GHG") {
e_ES <- readSource("Eurostat_EffortSharing",subtype="emissions")
EU11map <- toolGetMapping("regionmapping_21_EU11.csv", type = "regional")
EU11map <- toolGetMapping("regionmapping_21_EU11.csv", type = "regional", where = "mappingfolder")
e_REMIND <- as.magpie(data.frame(
period=rep(2005,9),
regionscode=c("DEU","ECE","ECS","ENC","ESC","ESW","EWN","FRA","UKI"),
Expand Down
2 changes: 1 addition & 1 deletion R/calcEmber.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ calcEmber <- function(subtype = "all") {
}

# load and apply mapping to chosen variables
map <- toolGetMapping("Mapping_Ember.csv", type = "reportingVariables") %>%
map <- toolGetMapping("Mapping_Ember.csv", type = "reportingVariables", where = "mappingfolder") %>%
filter(!is.na(!!sym("REMIND_Variable")), !!sym("REMIND_Variable") != "") # remove incomplete mapping rows

# combine variable and unit in mapping
Expand Down
11 changes: 6 additions & 5 deletions R/calcEmissionFactors.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,22 @@ calcEmissionFactors <- function(subtype = "emission_factors", sectoral_resolutio

# read in sectoral mapping (ECLIPSE (IMAGE) <> REMIND)
map_sectors_ECLIPSE2Agg <- read.csv(toolGetMapping(type = "sectoral", name = "mappingECLIPSEtoAggREMINDsectors.csv",
returnPathOnly = TRUE),
returnPathOnly = TRUE, where = "mappingfolder"),
stringsAsFactors = TRUE)
map_sectors_Agg2REMIND <- read.csv(toolGetMapping(type = "sectoral", name = "mappingAggREMINDtoREMINDsectors.csv",
returnPathOnly = TRUE),
returnPathOnly = TRUE, where = "mappingfolder"),
stringsAsFactors = TRUE)
map_sectors_ECLIPSE2REMIND <- read.csv(toolGetMapping(type = "sectoral", name = "mappingECLIPSEtoREMINDsectors.csv",
returnPathOnly = TRUE),
returnPathOnly = TRUE, where = "mappingfolder"),
stringsAsFactors = TRUE)
# map_sectors <- map_sectors[which(!is.na(map_sectors$EDGE)),] # Remove transport sector (which is not represented in EDGE)

# read in regional map (select ISO and GAINS codes only). This is required for the construction of the SSPs
map_REMINDregions <- read.csv2(toolGetMapping(type = "regional", name = "regionmappingREMIND.csv",
returnPathOnly = TRUE),
returnPathOnly = TRUE, where = "mappingfolder"),
stringsAsFactors = TRUE)
map_regions <- read.csv2(toolGetMapping(type = "regional", name = "regionmappingGAINS.csv", returnPathOnly = TRUE),
map_regions <- read.csv2(toolGetMapping(type = "regional", name = "regionmappingGAINS.csv", returnPathOnly = TRUE,
where = "mappingfolder"),
stringsAsFactors = TRUE)[, c(2, 3)]
map_regions <- map_regions %>%
filter(.data$CountryCode != "ANT") %>% # Remove Netherland Antilles (not in REMIND regional mapping)
Expand Down
2 changes: 1 addition & 1 deletion R/calcEmissionFactorsFeedstocks.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ calcEmissionFactorsFeedstocks <- function() {
product_mapping <- toolGetMapping(
name = "structuremappingIO_outputs_NECHEM.csv",
type = "sectoral"
) %>%
, where = "mappingfolder") %>%
as_tibble() %>%
right_join(
tribble(
Expand Down
15 changes: 9 additions & 6 deletions R/calcEmissions.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ calcEmissions <- function(datasource="CEDS16") {
emi <- emi[,,"6B_Other-not-in-total",invert=TRUE]

# aggregate and rename CEDS59 sectors to CEDS16 sectors
map_CEDS59_to_CEDS16 <- toolGetMapping(type = "sectoral", name = "mappingCEDS59toCEDS16.csv")
map_CEDS59_to_CEDS16 <- toolGetMapping(type = "sectoral", name = "mappingCEDS59toCEDS16.csv",
where = "mappingfolder")
tmp <- toolAggregate(x=emi,weight = NULL, dim=3.1, rel = map_CEDS59_to_CEDS16, from="CEDS59",to="CEDS16")

# rename emissions according to map (currently only relevant for VOC)
Expand Down Expand Up @@ -91,7 +92,8 @@ calcEmissions <- function(datasource="CEDS16") {
emi <- emi[,,"6B_Other-not-in-total", invert=TRUE]

# aggregate and rename CEDS59 sectors to REMIND variables
map_CEDS59_to_REMIND <- toolGetMapping(type = "sectoral", name = "mappingCEDS59toREMINDreporting.csv")
map_CEDS59_to_REMIND <- toolGetMapping(type = "sectoral", name = "mappingCEDS59toREMINDreporting.csv",
where = "mappingfolder")
emi <- toolAggregate(x=emi,weight = NULL, dim=3.1, rel = map_CEDS59_to_REMIND, from="CEDS59",to="REMIND")

# rename emissions according to map (currently only relevant for VOC)
Expand Down Expand Up @@ -170,7 +172,8 @@ calcEmissions <- function(datasource="CEDS16") {
emi <- emi[,, "6B_Other-not-in-total", invert=TRUE]

# aggregate and rename CEDS59 sectors to REMIND sectors
map_CEDS59_to_REMIND <- toolGetMapping(type = "sectoral", name = "mappingCEDS59toREMINDreporting_2021.csv")
map_CEDS59_to_REMIND <- toolGetMapping(type = "sectoral", name = "mappingCEDS59toREMINDreporting_2021.csv",
where = "mappingfolder")
emi <- toolAggregate(x=emi,weight = NULL, dim=3.1, rel = map_CEDS59_to_REMIND, from="CEDS59",to="REMIND")

# undo unnecessary conversion from convertCEDS2021.R
Expand Down Expand Up @@ -397,7 +400,7 @@ calcEmissions <- function(datasource="CEDS16") {
emi[,, "n2o"] <- emi[,, "n2o"] * 1000

# map sectors and pollutants to REMIND nomenclature
map_sec <- toolGetMapping("mappingEDGAR6toREMIND.csv", type = "sectoral")
map_sec <- toolGetMapping("mappingEDGAR6toREMIND.csv", type = "sectoral", where = "mappingfolder")
map_pol <- c(n2o="N2O", ch4="CH4", co2_excl_short="CO2",
nh3="NH3", no2="NOX", bc="BC", co="CO", oc="OC", nmvoc="VOC", pm10="PM10", pm25="PM25", so2="Sulfur")

Expand Down Expand Up @@ -464,7 +467,7 @@ calcEmissions <- function(datasource="CEDS16") {
getNames(em_limits, dim=2)[which(getNames(em_limits, dim=2) == "NOX")] <- "NOx"

map <- read.csv2(toolGetMapping(type = "sectoral", name = "mappingLIMITSsectorstoREMINDsectors.csv",
returnPathOnly = TRUE),
returnPathOnly = TRUE, where = "mappingfolder"),
stringsAsFactors=TRUE)

em_limits[is.na(em_limits)] <- 0.0
Expand Down Expand Up @@ -496,7 +499,7 @@ calcEmissions <- function(datasource="CEDS16") {
# returnPathOnly = TRUE),
# stringsAsFactors=TRUE)
map <- read.csv2(toolGetMapping(type = "sectoral", name = "mappingECLIPSEsectorstoREMINDsectors.csv",
returnPathOnly = TRUE),
returnPathOnly = TRUE, where = "mappingfolder"),
stringsAsFactors=TRUE)

em_eclipse[is.na(em_eclipse)] <- 0.0
Expand Down
4 changes: 2 additions & 2 deletions R/calcEmploymentfactors.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

calcEmploymentfactors <- function(improvements,multiplier){
if (improvements=="None"||improvements=="CEEW"||improvements=="Dias"||improvements=="Rutovitz_aus"||improvements=="Solar_found"||improvements=="All"){
mapping <- toolGetMapping(type = "regional",name = "regionalmappingWEO2014.csv")
mapping_remind <- toolGetMapping(type = "regional",name = "regionmappingH12.csv")
mapping <- toolGetMapping(type = "regional",name = "regionalmappingWEO2014.csv", where = "mappingfolder")
mapping_remind <- toolGetMapping(type = "regional",name = "regionmappingH12.csv", where = "mappingfolder")
colnames(mapping) <- c("region","country")
mapping$country <- toolCountry2isocode(mapping$country)

Expand Down
3 changes: 2 additions & 1 deletion R/calcEuropeanEnergyDatasheets.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ calcEuropeanEnergyDatasheets <- function(subtype) {
"year" = "Year", "value" = "Value"
)

mapping <- toolGetMapping("Mapping_EuropeanEnergyDatasheets.csv", type = "reportingVariables") %>%
mapping <- toolGetMapping("Mapping_EuropeanEnergyDatasheets.csv", type = "reportingVariables",
where = "mappingfolder") %>%
filter(!is.na(!!sym("REMIND")), !!sym("REMIND") != "") %>%
mutate(!!sym("Conversion") := as.numeric(!!sym("Conversion"))) %>%
select("variable" = "EED", "REMIND", "Conversion")
Expand Down
3 changes: 2 additions & 1 deletion R/calcFE.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ calcFE <- function(source = "IEA", scenario_proj = "SSP2") {
# remove period where only 0s appear
data <- data[, 2021, , invert = T]

mapping <- toolGetMapping(type = "sectoral", name = "structuremappingIO_reporting.csv", returnPathOnly = TRUE)
mapping <- toolGetMapping(type = "sectoral", name = "structuremappingIO_reporting.csv",
returnPathOnly = TRUE, where = "mappingfolder")
target <- c("output")
map <- read.csv2(mapping, stringsAsFactors = FALSE, na.strings = "")
# delete NAs rows
Expand Down
19 changes: 11 additions & 8 deletions R/calcFEdemand.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ calcFEdemand <- function(subtype = "FE", use_ODYM_RECC = FALSE) {
trp_nodes <- c("ueelTt", "ueLDVt", "ueHDVt")

## we work in the REMIND H12 regions to avoid strange ISO country behavior when rescaling
mappingfile <- toolGetMapping(type = "regional", name = "regionmappingH12.csv", returnPathOnly = TRUE)
mappingfile <- toolGetMapping(type = "regional", name = "regionmappingH12.csv",
returnPathOnly = TRUE, where = "mappingfolder")
rmnd_reg <- toolAggregate(rmnditem, mappingfile, from="CountryCode", to="RegionCode")

## to data.table (we use gdp_SSP2 as a starting point)
Expand Down Expand Up @@ -259,7 +260,8 @@ calcFEdemand <- function(subtype = "FE", use_ODYM_RECC = FALSE) {
# - cumulate the reduction factor over the time horizon

SSA_countries <- read_delim(
file = toolGetMapping(type = 'regional', name = 'regionmappingH12.csv', returnPathOnly = TRUE),
file = toolGetMapping(type = 'regional', name = 'regionmappingH12.csv',
returnPathOnly = TRUE, where = "mappingfolder"),
delim = ';',
col_names = c('country', 'iso3c', 'region'),
col_types = 'ccc',
Expand Down Expand Up @@ -417,7 +419,7 @@ calcFEdemand <- function(subtype = "FE", use_ODYM_RECC = FALSE) {
character.data.frame()

regionmapping <- toolGetMapping(type = 'regional',
name = 'regionmappingH12.csv') %>%
name = 'regionmappingH12.csv', where = "mappingfolder") %>%
select(country = 'X', iso3c = 'CountryCode', region = 'RegionCode')

historic_trend <- c(2004, 2020)
Expand Down Expand Up @@ -506,7 +508,7 @@ calcFEdemand <- function(subtype = "FE", use_ODYM_RECC = FALSE) {
}

if (subtype %in% c("FE", "FE_buildings", "UE_buildings", "FE_for_Eff", "UE_for_Eff", "ES")) {
mapping = toolGetMapping(type = "sectoral", name = "structuremappingIO_outputs.csv")
mapping = toolGetMapping(type = "sectoral", name = "structuremappingIO_outputs.csv", where = "mappingfolder")

REMIND_dimensions = "REMINDitems_out"
sets_names = getSets(data)
Expand All @@ -521,7 +523,8 @@ calcFEdemand <- function(subtype = "FE", use_ODYM_RECC = FALSE) {

} else if (subtype %in% c("EsUeFe_in","EsUeFe_out")){

mapping_path <- toolGetMapping(type = "sectoral", name = "structuremappingIO_EsUeFe.csv", returnPathOnly = TRUE)
mapping_path <- toolGetMapping(type = "sectoral", name = "structuremappingIO_EsUeFe.csv",
returnPathOnly = TRUE, where = "mappingfolder")
mapping = read.csv2(mapping_path, stringsAsFactors = F)
}
#----- PROCESS DATA ------------------
Expand Down Expand Up @@ -880,7 +883,7 @@ calcFEdemand <- function(subtype = "FE", use_ODYM_RECC = FALSE) {
) %>%
ungroup()

region_mapping_21 <- toolGetMapping('regionmapping_21_EU11.csv', 'regional') %>%
region_mapping_21 <- toolGetMapping('regionmapping_21_EU11.csv', 'regional', where = "mappingfolder") %>%
as_tibble() %>%
select(iso3c = 'CountryCode', region = 'RegionCode')

Expand Down Expand Up @@ -1454,7 +1457,7 @@ calcFEdemand <- function(subtype = "FE", use_ODYM_RECC = FALSE) {
mutate(year = as.integer(as.character(.data$year))) %>%
inner_join(
toolGetMapping(name = 'regionmappingOECD.csv',
type = 'regional') %>%
type = 'regional', where = "mappingfolder") %>%
as_tibble() %>%
select(iso3c = 'CountryCode', region = 'RegionCode'),

Expand Down Expand Up @@ -1496,7 +1499,7 @@ calcFEdemand <- function(subtype = "FE", use_ODYM_RECC = FALSE) {
expand.values = TRUE) %>%
inner_join(
toolGetMapping(name = 'regionmappingOECD.csv',
type = 'regional') %>%
type = 'regional', where = "mappingfolder") %>%
as_tibble() %>%
select(iso3c = 'CountryCode', region = 'RegionCode'),

Expand Down
Loading

0 comments on commit 623de95

Please sign in to comment.