diff --git a/ConcordanceLibrary/LabelsAndCodes/002_BaseRegionClassification.xlsx b/ConcordanceLibrary/LabelsAndCodes/002_BaseRegionClassification.xlsx deleted file mode 100644 index 884a165..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/002_BaseRegionClassification.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/LabelsAndCodes/005_BaseRegionClassification.xlsx b/ConcordanceLibrary/LabelsAndCodes/005_BaseRegionClassification.xlsx deleted file mode 100644 index 6c84340..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/005_BaseRegionClassification.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/LabelsAndCodes/049_BaseRegionClassification.xlsx b/ConcordanceLibrary/LabelsAndCodes/049_BaseRegionClassification.xlsx deleted file mode 100644 index 4051d0f..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/049_BaseRegionClassification.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/LabelsAndCodes/Archive/PIOLab_RootClassification_OLD.xlsx b/ConcordanceLibrary/LabelsAndCodes/Archive/PIOLab_RootClassification_OLD.xlsx deleted file mode 100644 index 390d013..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/Archive/PIOLab_RootClassification_OLD.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/LabelsAndCodes/Ind20Pro22v1_BaseSectorClassification.xlsx b/ConcordanceLibrary/LabelsAndCodes/Ind20Pro22v1_BaseSectorClassification.xlsx deleted file mode 100644 index 2854938..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/Ind20Pro22v1_BaseSectorClassification.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/LabelsAndCodes/Ind30Pro39v1_BaseSectorClassification.xlsx b/ConcordanceLibrary/LabelsAndCodes/Ind30Pro39v1_BaseSectorClassification.xlsx deleted file mode 100644 index c0bed3a..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/Ind30Pro39v1_BaseSectorClassification.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/LabelsAndCodes/Ind30Pro40v1_BaseSectorClassification.xlsx b/ConcordanceLibrary/LabelsAndCodes/Ind30Pro40v1_BaseSectorClassification.xlsx deleted file mode 100644 index a04fac4..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/Ind30Pro40v1_BaseSectorClassification.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/LabelsAndCodes/PIOLab_RootClassification.xlsx b/ConcordanceLibrary/LabelsAndCodes/PIOLab_RootClassification.xlsx deleted file mode 100644 index 9843c46..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/PIOLab_RootClassification.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/LabelsAndCodes/~$Ind30Pro40v1_BaseSectorClassification.xlsx b/ConcordanceLibrary/LabelsAndCodes/~$Ind30Pro40v1_BaseSectorClassification.xlsx deleted file mode 100644 index c618a99..0000000 Binary files a/ConcordanceLibrary/LabelsAndCodes/~$Ind30Pro40v1_BaseSectorClassification.xlsx and /dev/null differ diff --git a/ConcordanceLibrary/Sector Aggregators/20200421_30Industries_SectorAggregator.csv b/ConcordanceLibrary/Sector Aggregators/20200421_30Industries_SectorAggregator.csv deleted file mode 100644 index 9864143..0000000 --- a/ConcordanceLibrary/Sector Aggregators/20200421_30Industries_SectorAggregator.csv +++ /dev/null @@ -1,76 +0,0 @@ -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0 diff --git a/ConcordanceLibrary/Sector Aggregators/20200421_39Products_SectorAggregator.csv b/ConcordanceLibrary/Sector Aggregators/20200421_39Products_SectorAggregator.csv deleted file mode 100644 index e0b669a..0000000 --- a/ConcordanceLibrary/Sector Aggregators/20200421_39Products_SectorAggregator.csv +++ /dev/null @@ -1,266 +0,0 @@ -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,1,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0 -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0 diff --git a/ConcordanceLibrary/WSA/20200421_WSA_Source2Root_Industry.csv b/ConcordanceLibrary/WSA/20200421_WSA_Source2Root_Industry.csv deleted file mode 100644 index a03a7bf..0000000 --- a/ConcordanceLibrary/WSA/20200421_WSA_Source2Root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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/ConcordanceLibrary/WSA/20200421_WSA_Source2Root_Product.csv b/ConcordanceLibrary/WSA/20200421_WSA_Source2Root_Product.csv deleted file mode 100644 index cf043f7..0000000 --- a/ConcordanceLibrary/WSA/20200421_WSA_Source2Root_Product.csv +++ /dev/null @@ -1,27 +0,0 @@ -0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/IEfeeds_code/Ind20Pro22v1_InitialEstimate.m b/IEfeeds_code/Ind20Pro22v1_InitialEstimate.m deleted file mode 100644 index 4866435..0000000 --- a/IEfeeds_code/Ind20Pro22v1_InitialEstimate.m +++ /dev/null @@ -1,49 +0,0 @@ -function [RegMap,IndMap,ProdMap]=Ind20Pro22v1_InitialEstimate(handles) - - disp('Launching initial estimate for the extended PIOT version 1'); - - % Write handles variables into mat-file for R to read - % Working directory - filename = [handles.processeddatadir,'WorkingDirectory4R.mat']; - out = handles.motherALANGdir; - save(filename,'out'); - - % Write region aggregator to file - filename = [handles.processeddatadir,'RegionAggFile4R.mat']; - out = handles.regionaggfile; - save(filename,'out'); - - % Region aggregator - RegMap = csvread(handles.regionagg); - - if size(RegMap,1) > size(RegMap,2) % check orientation of aggregator - RegMap = RegMap'; - end - - reg_proxy = ones(size(RegMap,2),1); - RegMap = prorate(RegMap,'col_proxy',reg_proxy); - - % Product aggregator - ProdMap = csvread(handles.sectoraggprod); - - if size(ProdMap,1) > size(ProdMap,2) % check orientation of aggregator - ProdMap = ProdMap'; - end - - prod_proxy = ones(size(ProdMap,2),1); - ProdMap = prorate(ProdMap,'col_proxy',prod_proxy); - - % Industry aggregator - IndMap = csvread(handles.sectoragg); - - if size(IndMap,1) > size(IndMap,2) % check orientation of aggregator - IndMap = IndMap'; - end - - ind_proxy = ones(size(IndMap,2),1); - IndMap = prorate(IndMap,'col_proxy',ind_proxy); - - command = 'Rscript /import/emily1/isa/IELab/Roots/PIOLab/Rscripts/IEfeeds_code/Ind20Pro22v1_InitialEstimate.R'; - system(command,'-echo'); - - end \ No newline at end of file diff --git a/IEfeeds_code/Ind30Pro40v1_InitialEstimate.m b/IEfeeds_code/Ind30Pro40v1_InitialEstimate.m deleted file mode 100644 index 7db8a82..0000000 --- a/IEfeeds_code/Ind30Pro40v1_InitialEstimate.m +++ /dev/null @@ -1,49 +0,0 @@ -function [RegMap,IndMap,ProdMap]=Ind30Pro40v1_InitialEstimate(handles) - - disp('Launching initial estimate for the extended PIOT version 1'); - - % Write handles variables into mat-file for R to read - % Working directory - filename = [handles.processeddatadir,'WorkingDirectory4R.mat']; - out = handles.motherALANGdir; - save(filename,'out'); - - % Write region aggregator to file - filename = [handles.processeddatadir,'RegionAggFile4R.mat']; - out = handles.regionaggfile; - save(filename,'out'); - - % Region aggregator - RegMap = csvread(handles.regionagg); - - if size(RegMap,1) > size(RegMap,2) % check orientation of aggregator - RegMap = RegMap'; - end - - reg_proxy = ones(size(RegMap,2),1); - RegMap = prorate(RegMap,'col_proxy',reg_proxy); - - % Product aggregator - ProdMap = csvread(handles.sectoraggprod); - - if size(ProdMap,1) > size(ProdMap,2) % check orientation of aggregator - ProdMap = ProdMap'; - end - - prod_proxy = ones(size(ProdMap,2),1); - ProdMap = prorate(ProdMap,'col_proxy',prod_proxy); - - % Industry aggregator - IndMap = csvread(handles.sectoragg); - - if size(IndMap,1) > size(IndMap,2) % check orientation of aggregator - IndMap = IndMap'; - end - - ind_proxy = ones(size(IndMap,2),1); - IndMap = prorate(IndMap,'col_proxy',ind_proxy); - - command = 'Rscript /import/emily1/isa/IELab/Roots/PIOLab/Rscripts/IEfeeds_code/Ind30Pro40v1_InitialEstimate.R'; - system(command,'-echo'); - - end \ No newline at end of file diff --git a/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_AligningDataV2.R b/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_AligningDataV2.R deleted file mode 100644 index 4457027..0000000 --- a/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_AligningDataV2.R +++ /dev/null @@ -1,90 +0,0 @@ -################################################################################ -# This function uses WSA data to estimate forging output and -# aligns trade data with IRP extraction -# It differs from version 1 in not filling the gaps in WSA by comparing with IEA -# Author: hanspeter.wieland@wu.ac.at -# Date: 26.03.2020 - -IEDataProcessing_PIOLab_AligningDataV2 <- function(year,path) -{ - - print("IEDataProcessing_PIOLab_AligningDataV2 initiated.") - - # Loading BACI trade data and IRP extraction accounts: - - BACI <- read.csv(file = paste0(path$IE_Processed,"/BACI/BACI_",year,".csv")) - - IronOre <- read.csv(file = paste0(path$IE_Processed,"/IRP/IRP_",year,".csv")) - - colnames(IronOre)[2] <- "Extraction" - - sel <- setdiff(base$region$Code,IronOre$base) # Countries with no extraction - - BACI$Quantity[BACI$From %in% sel & BACI$Product == 1] <- 0 # Set zero - - BACI <- BACI[BACI$Quantity != 0,] # Filter regions with non-zero values - - # Write to folder: - - write.csv(BACI,file = paste0(path$IE_Processed,"/BACI/BACI_",year,".csv"), - row.names = FALSE) - - remove(IronOre,sel) # Delete objects not needed anymore - - - # 2. Estimate forgings - - - # Read settings list for WSA data feeds: - - Settings <- read.xlsx(paste0(path$Settings,"/datafeeds_settings/WSA_settings.xlsx")) - - # Read production, import and export of ingots from WSA and BACI: - - Ingots <- list("Production" = read.csv(paste0(path$IE_Processed,"/WSA/WSA_",year,"_Ingots.csv"))) - - Ingots[["Code"]] <- filter(base$flow, Name == "Ingots") %>% pull(Code) - - Ingots[["Export"]] <- filter(BACI, Product == Ingots$Code) %>% select(-Product) %>% - group_by(From) %>% summarise(Quantity = sum(Quantity)) %>% ungroup(From) - - Ingots[["Import"]] <- filter(BACI, Product == Ingots$Code) %>% select(-Product) %>% - group_by(To) %>% summarise(Quantity = sum(Quantity)) %>% ungroup(To) - - # Estimate forging output: - - Forgings <- data.frame("base" = 1:nrow(base$region), - "Quantity" = 0, - "In_pro" = 0, - "In_im" = 0, - "In_ex" = 0) - - Forgings$In_pro[Ingots$Production$base] <- Ingots$Production$Quantity - - Forgings$In_im[Ingots$Import$To] <- Ingots$Import$Quantity - - Forgings$In_ex[Ingots$Export$From] <- Ingots$Export$Quantity - - Forgings$Quantity <- Forgings$In_pro - Forgings$In_ex + Forgings$In_im - - Forgings$Quantity[Forgings$Quantity < 0] <- Forgings$In_im[Forgings$Quantity < 0] - - Forgings <- select(Forgings, base, Quantity) - - - # Check if folder with processed data exists and in case delete: - - df_Processed <- paste0(path$IE_Processed,"/AligningData") - - if(dir.exists(df_Processed)) unlink(df_Processed,recursive = TRUE) - - dir.create(df_Processed) # Create new (empty) folder - - # Write data to folder - - write.csv(Forgings,file = paste0(df_Processed,"/Forgings_",year,".csv"), - row.names = FALSE) - - print("IEDataProcessing_PIOLab_AligningDataV2 finished.") - -} \ No newline at end of file diff --git a/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_BuildingDomesticTablesV2.R b/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_BuildingDomesticTablesV2.R deleted file mode 100644 index 43e93d7..0000000 --- a/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_BuildingDomesticTablesV2.R +++ /dev/null @@ -1,728 +0,0 @@ -##################################### -# # -# This code writes the data # -# into the domestic SUTs that # -# can be used as an input for # -# AISHA # -# # -##################################### - - -IEDataProcessing_PIOLab_BuildingDomesticTablesV2 <- function(year,path) -{ - # !diagnostics off - - print("IEDataProcessing_PIOLab_BuildingDomesticTables initiated.") - - # Add path to IE classification setting file: - - path[["IE_classification"]] <- paste0(path$Concordance,"/LabelsAndCodes/",IEdatafeed_name,"_BaseSectorClassification.xlsx") - - # Load prorating function and Number2File: - - source(paste0(path$Subroutines,"/Prorate.R")) - - source(paste0(path$Subroutines,"/Numbers2File.R")) - - - Codes <- list( "WIO" = read.csv(file = paste0(path$IE_Processed,"/EXIOWasteMFAIO/IO_codes.csv") ) ) - - Setting <- list( "WSA" = read.xlsx(xlsxFile = paste0(path$Settings,"/datafeeds_settings/WSA_settings.xlsx"), sheet = 1 ), - "IE" = read.xlsx(xlsxFile = paste0(path$Settings,"/datafeeds_settings/IE_settings.xlsx"), sheet = 1 )) - - Setting$WSA["path"] <- paste0(path$IE_Processed,"/WSA/WSA_",year,"_",Setting$WSA$FeedName,".csv") - - - # Load flow data where all regions are included in one object: - - data <- list( "FinalDemand" = read.csv( paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_","FinalDemand.csv") ), - "Fab2Demand" = read.csv( paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_","Fabrication2FinalDemand.csv") ), - "BACI" = read.csv(paste0(path$IE_Processed,"/BACI/BACI_",year,".csv") ), - "Eol" = read.csv(paste0(path$IE_Processed,"/EOL/EOL_",year,".csv") ), - "IRP" = read.csv(paste0(path$IE_Processed,"/IRP/IRP_",year,".csv") ), - "Grade" = read.csv(paste0(path$IE_Processed,"/Grades/IronOreGrades.csv") ), - "Yield" = select(read.csv(paste0(path$IE_Processed,"/WSA/SteelIndustryYields.csv")),Process,Average), - "WSA" = lapply(X = Setting$WSA$path, FUN = read.csv), - "Forgings" = read.csv(paste0(path$IE_Processed,"/AligningData/Forgings_",year,".csv") ) - ) - - # Load WSA Source2Root concordances - - set <- read.xlsx(xlsxFile = paste0(path$Settings,"/datafeeds_settings/WSA_settings.xlsx"),sheet = 2) - - path_sel <- list("flow" = paste0(path$Concordance,"/WSA/", - set$date[set$aggregator == "product"],"_WSA_Source2Root_Product.csv"), - "process" = paste0(path$Concordance,"/WSA/", - set$date[set$aggregator == "industry"],"_WSA_Source2Root_Industry.csv") - ) - - S2R <- list( "WSA" = list( "industry" = as.matrix( read.csv(path_sel$process,header = FALSE) ), - "product" = as.matrix( read.csv(path_sel$flow,header = FALSE) ) - ) - ) - - # Store root to mother concordances in list object: - - R2M_sel <- list( "WSA" = list( "industry" = R2M$process, - "product" = R2M$flow - ) - ) - - # Normalize source to root concordances (create maps) - - for(j in 1:2) S2R$WSA[[j]] <- as.matrix( S2R$WSA[[j]] / rowSums(S2R$WSA[[j]]) ) - - S2M <- list("WSA" = list()) # Create empty list to store source to mother maps - - # Create Source to mother map: - - for(j in 1:2) S2M$WSA[[j]] <- S2R$WSA[[j]] %*% R2M_sel$WSA[[j]] - - # Load SUT templates - - SUT_temp <- list( "Supply" = as.matrix( read.xlsx(path$IE_classification, sheet = 5,rowNames = TRUE) ), - "Use" = as.matrix( read.xlsx(path$IE_classification, sheet = 6,rowNames = TRUE) ) - ) - - # Load allocation function - - # source(paste0(path$Subroutines,"/AllocateSupply2Use.R")) - - # Define general variables: - - # num <- list("pro" = nrow(base$product), - # "ind" = nrow(base$industry), - # "reg" = nrow(base$region), - # "va" = nrow(base$input), - # "fd" = nrow(base$demand) ) - - for(i in 1:num$reg) - { - print(paste("Compiling",base$region$Name[i])) - - # Create empty SUT: - - SUT <- data.frame(matrix(0,(num$flow + num$process + num$input),(num$flow + num$process + num$demand))) - - colnames(SUT) <- c(base$process$Name, - base$flow$Name, - base$demand$Name) - - rownames(SUT) <- c(base$process$Name, - base$flow$Name, - base$input$Name) - - SUT <- as.matrix(SUT) # Transform to matrix write numbers using matrix indices - - - ### Flows associated with fabrication ### - - - # Load data on fabrication use: - - data_sel <- read.csv(paste0(path$IE_Processed,"/Cullen/FabricationUse_", - year,"_",base$region$Name[i],".csv"), - header = FALSE) - - # Store matrix index in list: - - index <- list("row" = num$process + filter(base$flow,Type == "Finished") %>% pull(Code), - "col" = filter(base$process,Type == "Final") %>% pull(Code)) - - SUT[index$row,index$col] <- as.matrix(data_sel) # Write into table - - # Load data on fabrication scrap output - - data_sel <- read.csv(paste0(path$IE_Processed,"/Cullen/FabricationScrap_", - year,"_",base$region$Name[i],".csv")) - - # Matrix indices in list: - - index <- list("row" = data_sel$base, - "col" = num$process + filter(base$flow, Name == "Fabrication scrap") %>% pull(Code)) - - SUT[index$row,index$col] <- data_sel$Quantity # Write scrap flows into table - - # Read data for useful fabrication output - - data_sel <- select(data$Fab2Demand,base.from,sector.from,Quantity) %>% filter(base.from == i) %>% - group_by(base.from,sector.from) %>% summarise(Quantity = sum(Quantity)) %>% ungroup(base.from,sector.from) - - # Store matrix index in list: - - index <- as.matrix(data.frame("row" = filter(base$process,Type == "Final") %>% pull(Code), - "col" = num$process + filter(base$flow,Type == "Final") %>% pull(Code) - ) - ) - - SUT[index] <- data_sel$Quantity # Write fab output to table - - - # Read data on intermediate use of manufacturing output - - data_sel <- data$Fab2Demand %>% filter(base.from == i,base.to == i) %>% - select(sector.from,sector.to,Quantity) %>% group_by(sector.from,sector.to) %>% - summarise(Quantity = sum(Quantity)) %>% ungroup(sector.from,sector.from) - - # Read base sector codes: - - index <-data.frame( "row" = num$process + filter(base$flow,Type == "Final") %>% pull(Code), - "col" = filter(base$process,Type == "Final") %>% pull(Code) ) - - data_sel$sector.from <- index$row[data_sel$sector.from] # Exchange WIO codes with base row codes - - data_sel$sector.to <- index$col[data_sel$sector.to] # Exchange WIO codes with base col codes - - # Copy base codes into data frame and transform into matrix: - - index <- as.matrix(data_sel[,c("sector.from","sector.to")]) - - SUT[index] <- data_sel$Quantity - - - # Read flows from final production sector (manuf.) to final demand category: - - data_sel <- data$FinalDemand %>% filter(base.from == i,base.to == i) %>% - select(sector,demand,Quantity) %>% group_by(sector,demand) %>% - summarise(Quantity = sum(Quantity)) %>% ungroup(sector,sector,demand) - - # Read base sector codes: - - index <-data.frame( "row" = filter(base$process,Type == "Final") %>% pull(Code)) - - data_sel$sector <- index$row[data_sel$sector] # Exchange WIO code with base sector code - - data_sel$demand <- data_sel$demand + num$process + num$flow # Exchange WIO with base sector code - - index <- as.matrix( data_sel[,c("sector","demand")] ) # Create matrix for indices - - SUT[index] <- data_sel$Quantity - - - ### Output of steelmaking sector ### - - # Read WSA id's of processed data that is relevant: - - Code_sel <- Setting$WSA %>% filter(Type %in% c("Primary","Secondary","Finished")) %>% - select(id, FeedName, Type) - - # Use id to extract a list containing the processed data: - - data_sel <- data$WSA[Code_sel$id] - - # Create vector in list to store the data for country i: - - Value <- list( "Source" = vector( mode="integer", length= length(data_sel) ) ) - - # Write production numbers in vector: - - for( j in 1:nrow(Code_sel) ) - { - if(i %in% data_sel[[j]]$base) Value$Source[j] <- filter(data_sel[[j]],base == i) %>% pull(Quantity) - } - - # Map raw data to mother product classification: - - Value[["Mother"]] <- colSums( S2M$WSA[[2]][Code_sel$id,] * Value$Source ) - - # Read indices of steelmaking sector outputs - - index <- list( "row" = filter(base$process,Type %in% c("Primary","Secondary","Finished")) %>% pull(Code), - "col" = filter(base$flow,Type %in% c("Primary","Secondary","Finished")) %>% pull(Code) - ) - - Value[["Supply"]] <- SUT_temp$Supply %*% diag(Value$Mother) # Allocate products to industries - - # Write values into SUT (note addition of number of industries to column indices): - - SUT[index$row, num$process + index$col] <- Value$Supply[index$row,index$col] - - ### Add forging production ### - - if(i %in% data$Forgings$base) - { - SUT["Steel casting and forging","Forgings"] <- filter(data$Forgings,base == i) %>% pull(Quantity) - } - - # Read indices of secondary i.e. crude steel: - - index <- data.frame("industry" = filter(base$process,Name %in% paste("Continuous casting of",c("slabs","billets","blooms"))) %>% pull(Code), - "product" = filter(base$flow,Name %in% c("Slabs","Billets","Blooms")) %>% pull(Code) - ) - - - # Create map to calculate crude steel (secondary) output by estimating demand of downstream processes: - - Map <- t( SUT_temp$Use[index$product,] ) / colSums( SUT_temp$Use[index$product,] ) - - Map[is.na(Map)] <- 0 - - # Estimate crude steel demand/output: - - Value <- colSums( Map * rowSums(SUT[base$process$Code, num$process + base$flow$Code]) ) - - index$product <- index$product + num$process # Change product (col) code to write in SUT - - SUT[as.matrix(index)] <- Value # Write value - - - ### Estimate forming scrap ### - - # indices of forming processes: - - index <- list( "industry" = filter(base$process, Type == "Finished") %>% pull(Code) ) - - # Output of forming processes: - - Value <- rowSums(SUT[index$industry, num$process + base$flow$Code]) - - # Scrap = ( Useful output / yield ) - Useful output: - - Value <- ( Value / filter(data$Yield, Process == "Hot rolling yield") %>% pull(Average) ) - Value - - SUT[index$industry,"Forming scrap"] <- Value # Write values in SUT - - ############################################## - ### Estimate final outputs of steel sector ### - ############################################## - - # Read process factor for top gas per pig iron: - - factor <- filter(Setting$IE, item == "TopGasPerPigIron") %>% pull(value) - - - # Write emissions in final output quadrant: - - SUT["Blast furnace","Atmosphere"] <- SUT["Blast furnace","Pig iron"] * factor - - - # Read slag per unit pig iron and allocate amount to output to landfill - - factor <- filter(Setting$IE, item == "SlagPerPigIron") %>% pull(value) - - SUT["Blast furnace","Landfill"] <- SUT["Blast furnace","Pig iron"] * factor - - - # Read gangue per unit sponge iron factor and add amount to landfill: - - factor <- filter(Setting$IE, item == "GanguePerSpongeIron") %>% pull(value) - - SUT["Direct reduction","Landfill"] <- SUT["Direct reduction","Sponge iron"] * factor - - - # Read oxygen blown furnace yield and use this for both OBF and open hearth furnace: - - factor <- filter(data$Yield,Process == "BOF yield") %>% pull(Average) - - # Read sector indices: - - index <- data.frame("industry" = filter(base$process, Name %in% c("Basic oxygen converter","Open hearth furnace")) %>% pull(Code), - "product" = num$process + filter(base$flow, Name %in% c("Liquid steel OBF","Liquid steel OHF")) %>% pull(Code) - ) - - # Write flow to landfill: - - SUT[index$industry,"Landfill"] <- ( SUT[as.matrix(index)] / factor ) - SUT[as.matrix(index)] - - - # Read electric arc furnace yield and estimate waste flow: - - factor <- filter(data$Yield,Process == "EAF yield") %>% pull(Average) - - Value <- SUT["Electric arc furnace","Liquid steel EAF"] # EAF steel production - - SUT["Electric arc furnace","Landfill"] <- ( Value / factor ) - Value - - - # Read slab and billet caster yields: - - factor <- filter( data$Yield,Process %in% c("Slab caster yield","Billet caster yield") ) %>% pull(Average) - - index <- data.frame("industry" = filter(base$process,Name %in% paste("Continuous casting of",c("slabs","billets"))) %>% pull(Code), - "product" = num$process + filter(base$flow,Name %in% c("Slabs","Billets") ) %>% pull(Code) - ) - - - SUT[index$industry,"Forming scrap"] <- ( SUT[as.matrix(index)] / factor ) - SUT[as.matrix(index)] - - - # Read bloom caster yield and use this for both blooms and ingost: - - factor <- filter( data$Yield,Process == "Bloom caster yield" ) %>% pull(Average) - - index <- data.frame("industry" = filter(base$process,Name %in% c("Continuous casting of blooms","Ingot casting")) %>% pull(Code), - "product" = num$process + filter(base$flow,Name %in% c("Blooms","Ingots") ) %>% pull(Code) - ) - - SUT[index$industry,"Forming scrap"] <- ( SUT[as.matrix(index)] / factor ) - SUT[as.matrix(index)] - - - ######################################################## - ### Fill use table of forming processes (= Finished) ### - ######################################################## - - - # Read indices of products that are used by these processes - # Note: Hot rolled coil-sheet-strip is handled separatly: - - index <- list( "product" = filter( base$flow, Name %in% c("Slabs","Billets","Blooms","Ingots") ) %>% pull(Code), - "industry" = filter( base$process, Type == "Finished" ) %>% pull(Code), - "interind" = filter( base$process, Type == "Secondary" ) %>% pull(Code) - ) - - # Read domestic output of intermediate inputs and of process: - - DomOut <- list( "Process" = rowSums(SUT[index$industry,]), - "Intermed" = rowSums(SUT[index$interind,]) - ) - - # Read use structure from template and create map: - - Map <- SUT_temp$Use[index$product, index$industry] - - # Create prorated map: - - Map <- Prorate(Map, DomOut$Process) - - Map[is.na(Map)] <- 0 - - - # Read export of intermediates: - - export <- filter(data$BACI,From == i,Product %in% index$product) %>% select(Product,Quantity) %>% - group_by(Product) %>% summarise(Quantity = sum(Quantity)) %>% ungroup(Product) - - - offset <- min(index$product)-1 # Offset product codes to write in Map - - if(length(export) >= 1) - { - Value <- DomOut$Intermed - Value[export$Product-offset] <- DomOut$Intermed[export$Product-offset] - export$Quantity - } - - # Check if exports are unavailable and if so set to zero: - - if( length(export) == 0 ) - { - Value <- DomOut$Intermed - } - - - - # Check if negatives exists and replace them with domestic production: - - for(j in 1:length(Value)) if(Value[j] < 0) Value[j] <- DomOut$Intermed[j] - - # Mulitply with map and write in use table - - SUT[num$process + index$product, index$industry] <- Map * Value - - - # Estimate use of hot rolled coil-sheet-strip products: - # Note that the use of hot rolled CSS by manufacturing is already accounted for by the WIO model extension - - index <- list( "product" = filter( base$flow, Name == "Hot rolled coil-sheet-strip" ) %>% pull(Code), - "rolling" = filter( base$process, Name %in% c("Tube welding","Cold rolling mill") ) %>% pull(Code), - "manufacturing" = filter( base$process, Type == "Final" ) %>% pull(Code), - "interind" = filter( base$process, Name == "Hot strip mill" ) %>% pull(Code) - ) - - # Read domestic output of intermediate inputs (product) and of relevant processes: - - DomOut <- list( "rolling" = rowSums(SUT[index$rolling,]), - "interind" = sum(SUT[index$interind,]), - "manufacturing" = sum(SUT[index$interind,]) - ) - - SUT[num$process + index$product, index$rolling] <- DomOut$rolling - - - # Estimate liquid steel use of casting: - - index <- list( "product" = filter( base$flow, Name %in% paste("Liquid steel",c("OBF","OHF","EAF")) ) %>% pull(Code), - "industry" = filter( base$process, Type == "Secondary" ) %>% pull(Code), - "interind" = filter( base$process, Name %in% c("Basic oxygen converter","Open hearth furnace","Electric arc furnace") ) %>% pull(Code) - ) - - # Read domestic output of intermediate inputs and of process: - - DomOut <- list( "industry" = rowSums(SUT[index$industry,]), - "Interind" = rowSums(SUT[index$interind,]) - ) - - # Read use structure from template and create map: - - Map <- SUT_temp$Use[index$product, index$industry] - - Map[is.na(Map)] <- 0 - - Map <- Prorate( Map, DomOut$industry) # Prorate map - - Value <- Map * DomOut$Interind # Multiply map with steel production - - SUT[num$process + index$product,index$industry] <- Value # Write into table - - - ### Primary inputs ### - - factor <- filter(Setting$IE, item == "AirPerPigIron") %>% pull(value) - - SUT["Air","Blast furnace"] <- SUT["Blast furnace","Pig iron"] * factor - - factor <- filter(Setting$IE, item == "CokePerPigIron") %>% pull(value) - - SUT["Coke","Blast furnace"] <- SUT["Blast furnace","Pig iron"] * factor - - factor <- filter(Setting$IE, item == "FluxPerPigIron") %>% pull(value) - - SUT["Flux","Blast furnace"] <- SUT["Blast furnace","Pig iron"] * factor - - # EoL scrap: - - if(i %in% data$Eol$base) SUT["End-of-Life Scrap","Scrap preparation"] <- data$Eol$Quantity[data$Eol$base == i] - - # IRP iron ore extraction - - if(i %in% data$IRP$base) - { - crude <- data$IRP$Quantity[data$IRP$base == i] - - SUT["Crude Ore","Mining"] <- crude - - # if no ore grades are available for a region, assume 0.6: - - if(i %in% data$Grade$base) concen <- data$Grade$Concentration[data$Grade$base == i] - - if(!i %in% data$Grade$base) concen <- 0.6 - - # Calculate iron content: - - iron <- crude * concen - - if(concen <= 0.6) ore <- iron / 0.6 # iron ore weight when 60% grade (ready for shipping) - - if(concen > 0.6) ore <- iron / concen # when concentration is > 0.6: not change - - SUT["Mining","Landfill"] <- crude - ore # Waste to landfill (supply-side of mining) - - SUT["Mining","Iron ore"] <- ore # Supply of iron ore (now 60% grade) by mining - } - - - ### Allocate iron ore use to ironmaking ### - - index <- list( "supply" = data.frame("industry" = filter(base$process, Name %in% c("Blast furnace","Direct reduction")) %>% pull(Code), - "product" = num$process + filter(base$flow, Name %in% c("Pig iron","Sponge iron")) %>% pull(Code) - ), - "use" = data.frame("industry" = filter(base$process, Name == "Mining") %>% pull(Code), - "product" = num$process + filter(base$flow, Name == "Iron ore") %>% pull(Code) - ) - ) - - # Read factors for iron ore inputs: - - factor <- filter(Setting$IE, item %in% c("OrePerPigIron","OrePerSpongeIron") ) %>% pull(value) - - # Read primary iron output and estimate total iron ore input with factors: - - TotIn <- SUT[ as.matrix(index$supply) ] * factor - - DomOut <- SUT[as.matrix(index$use)] # Read domestic production of iron ore - - if(DomOut > 0) - { - # Read export of iron ore: - - export <- filter(data$BACI,From == i,Product %in% (index$use$product-num$process) ) %>% select(Product,Quantity) %>% - group_by(Product) %>% summarise(Quantity = sum(Quantity)) %>% ungroup(Product) %>% pull(Quantity) - - if( length(export) == 0 ) export <- 0 # Check if exports are unavailable and if so set to zero - - Value <- DomOut - export - - if(Value < 0) Value <- DomOut # Set to domestic production if exports too large - - Map <- (TotIn/sum(TotIn)) # Create map - - Map[is.na(Map)] <- 1 # Set 1 if NA - - # Write values into table using map: - - SUT[index$use$product,index$supply$industry] <- Map * Value - - } - - ### Add forming and scrap use by steelmaking ### - - steel <- data.frame("ind" = filter(base$process, Name %in% c("Basic oxygen converter","Electric arc furnace")) %>% pull(Code), - "pro" = num$process + filter(base$flow, Name %in% paste("Liquid steel",c("OBF","EAF"))) %>% pull(Code) - ) - - # Read scrap per unit output factors: - - factor <- filter(Setting$IE, item %in% c("ScrapPerBOFsteel","ScrapPerEAFsteel") ) %>% pull(value) - - # Create map from output values: - - Map <- ( SUT[as.matrix(steel)] * factor ) / sum(SUT[as.matrix(steel)] * factor) - - Map[is.na(Map)] <- 0 - - # Multiply with forming scrap supply and write in table - - SUT["Forming scrap",steel$ind] <- Map * sum(SUT[,"Forming scrap"]) - - - - ### Write fabrication scrap use of waste management (scrap preparation) ### - - SUT["Fabrication scrap","Scrap preparation"] <- sum(SUT[,"Fabrication scrap"]) - - - ### Write steel scrap output in supply table ### - - SUT["Scrap preparation","Steel scrap"] <- sum(SUT[,"Scrap preparation"]) - - - ### Write steel scrap use by steelmaking ### - - # Read exports of steel scrap: - - index <- list("industry" = filter(base$process, Name %in% c("Basic oxygen converter","Electric arc furnace")) %>% pull(Code), - "product" = num$process + filter(base$flow, Name == "Steel scrap") %>% pull(Code) - ) - - DomOut <- SUT["Scrap preparation","Steel scrap"] # Read domestic production of steel scrap - - export <- filter(data$BACI,From == i,Product %in% (index$product-num$process) ) %>% select(Product,Quantity) %>% - group_by(Product) %>% summarise(Quantity = sum(Quantity)) %>% ungroup(Product) %>% pull(Quantity) - - - - if(length(export) >= 1) - { - Value <- DomOut - export - } - - if( length(export) == 0 ) # Check if exports are unavailable and if so set to zero - { - Value <- DomOut - } - - if(Value < 0) Value <- DomOut # Check if exports are larger - - SUT[index$product,index$industry] <- Map * Value # Write into table - - - ### Allocate pig and sponge iron to steelmaking ### - - index <- list("industry" = filter(base$process, Name %in% c("Basic oxygen converter","Open hearth furnace","Electric arc furnace")) %>% pull(Code), - "product" = filter(base$flow, Name %in% c("Pig iron","Sponge iron") ) %>% pull(Code) - ) - - steel <- data.frame("ind" = filter(base$process, Name %in% c("Basic oxygen converter","Open hearth furnace","Electric arc furnace")) %>% pull(Code), - "pro" = num$process + filter(base$flow, Name %in% paste("Liquid steel",c("OBF","OHF","EAF"))) %>% pull(Code) - ) - - iron <- data.frame("ind" = filter(base$process, Name %in% c("Blast furnace","Direct reduction") ) %>% pull(Code), - "pro" = num$process + filter(base$flow, Name %in% c("Pig iron","Sponge iron") ) %>% pull(Code) - ) - - # Estimate steel and iron outputs: - - DomOut <- list("steel" = SUT[as.matrix(steel)], - "iron" = SUT[as.matrix(iron)] - ) - - # Read export of pig iron and sponge iron: - - export <- filter(data$BACI,From == i,Product %in% (iron$pro - num$process) ) %>% select(Product,Quantity) %>% - group_by(Product) %>% summarise(Quantity = sum(Quantity)) %>% ungroup(Product) - - offset <- min(iron$pro - num$process)-1 - - if(length(export) >= 1) - { - Value <- DomOut$iron - Value[export$Product-offset] <- DomOut$iron[export$Product-offset] - export$Quantity - } - - # Check if exports are unavailable and if so set to zero: - - if( length(export) == 0 ) - { - Value <- DomOut$iron - } - - for(j in 1:length(Value)) if(Value[j] < 0) Value[j] <- DomOut$iron[j] - - factor <- filter(Setting$IE, item %in% c("PigIronPerBOFsteel","SpongeIronPerEAFsteel") ) %>% pull(value) - - Map <- SUT_temp$Use[index$pro,index$ind] # Create map for allocation - - Demand <- DomOut$steel * c( factor[1],1,factor[2] ) # Estimate iron demand - - Map <- Prorate(Map,Demand) # prorate the map - - Value <- Map * Value # Allocate values with map to use - - SUT[(index$pro + num$process), index$industry] <- Value # Write value in table - - - ### Save SUT ### - - # Check if subfolder in processed data exists and if not create it - - path_set <- paste0(path$IE_Processed,"/SUT") - - if(!dir.exists(path_set)) dir.create(path_set) - - # Setting decimals to two digits - - SUT <- round(SUT,2) - - print(min(SUT)) - - # Decompose SUT into single elements, that is supply, use, final demand, inputs from nature and eol scrap - - Use <- SUT[base$flow$Name,base$process$Name] - - Supply <- SUT[base$process$Name,base$flow$Name] - - # Final output (= final demand + landfill + atmosphere): - - FinalOutput <- SUT[base$process$Name,base$demand$Name] - - # Primary inputs: - - PrimaryInput <- SUT[base$input$Name,base$process$Name] - - # Remove all column and row names: - - colnames(Use) <- NULL - rownames(Use) <- NULL - colnames(Supply) <- NULL - rownames(Supply) <- NULL - colnames(FinalOutput) <- NULL - rownames(FinalOutput) <- NULL - colnames(PrimaryInput) <- NULL - rownames(PrimaryInput) <- NULL - - # Write tables to folder: - - Numbers2File(Supply, paste0(path_set,"/",year,"_Supply_Region",i,".csv") ) - - Numbers2File(Use, paste0(path_set,"/",year,"_Use_Region",i,".csv") ) - - Numbers2File(FinalOutput, paste0(path_set,"/",year,"_FinalOutput_Region",i,".csv") ) - - Numbers2File(PrimaryInput, paste0(path_set,"/",year,"_PrimaryInput_Region",i,".csv") ) - - print(paste0("Minimum value: ",min(SUT))) - - } - - print("IEDataProcessing_PIOLab_BuildingDomesticTables finished.") - -} diff --git a/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_WasteMFAIOExtensionV2.R b/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_WasteMFAIOExtensionV2.R deleted file mode 100644 index 941a7be..0000000 --- a/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_WasteMFAIOExtensionV2.R +++ /dev/null @@ -1,286 +0,0 @@ -############################################### -# # -# This code uses the data on fabrication # -# yields and products flows to end-use to # -# build the IO extension and estimate # -# the amount of fabrication scrap # -# # -############################################### - - -IEDataProcessing_PIOLab_WasteMFAIOExtensionV2 <- function(year,path) -{ - - print("IEDataProcessing_PIOLab_WasteMFAIOExtensionV2 initiated.") - - - # Load sector codes of aggregated EXIOBASE data - - IO.codes <- read.csv(file = paste0(path$IE_Processed,"/EXIOWasteMFAIO/IO_codes.csv"), - row.names = NULL) - - # Load variables and calculate gross output (x): - - L <- as.matrix( read.csv(paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_L.csv"), - row.names = NULL, - header = FALSE) - ) - - Y <- as.matrix( read.csv(paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_Y.csv"), - row.names = NULL, - header = FALSE) - ) - - x <- rowSums( L %*% Y ) # Calculate total output and create vector - - source(paste0(path$Subroutines,"/Numbers2File.R")) # Load fun. to write arrays to files - - # 1. Defining functions - - # Load WSA settings (for codes and feed names): - - Settings <- read.xlsx(paste0(path$Settings,"/datafeeds_settings/WSA_settings.xlsx")) - - - # Select codes for finished steel: - - Code <- list("base" = list("Finished" = filter(base$flow,Type == 'Finished') %>% pull(Code), - "Final" = filter(base$flow,Type == 'Final') %>% pull(Code), - "Forgings" = base$flow$Code[base$flow$Name == 'Forgings'], - "CoilSheetStrip" = base$flow$Code[base$flow$Name == "Hot rolled coil-sheet-strip"]), - "WSA" = Settings %>% filter(Type == 'Finished') %>% pull(id) ) - - - # Run syntax to load Source2Root maps: - - set <- read.xlsx(xlsxFile = paste0(path$Settings,"/datafeeds_settings/WSA_settings.xlsx"),sheet = 2) - - path_sel <- list("flow" = paste0(path$Concordance,"/WSA/", - set$date[set$aggregator == "product"],"_WSA_Source2Root_Product.csv"), - "process" = paste0(path$Concordance,"/WSA/", - set$date[set$aggregator == "industry"],"_WSA_Source2Root_Industry.csv") - ) - - Source2Root <-list("WSA" = as.matrix( read.csv(path_sel$flow,header = FALSE) )) - - Source2Root$WSA <- Source2Root$WSA[Code$WSA,] # Select only finished steel - - Source2Root$WSA <- Source2Root$WSA / rowSums(Source2Root$WSA) # Create map (normalized concordance) - - Source2Root[["Cullen"]] <- list("Product" = as.matrix( read.csv(paste0(path$Concordance,"/Cullen/Cullen_Source2Root_Product.csv"),header = FALSE) ), - "EndUse" = as.matrix( read.csv(paste0(path$Concordance,"/Cullen/Cullen_Source2Root_EndUse.csv"),header = FALSE) )) - - # Compile Source to mother concordance for finished steel products - - Source2Mother <- list("WSA" = Source2Root$WSA %*% as.matrix(R2M$flow[,Code$base$Finished]) ) - - # Load WSA Source2Source map for estimate final use of hot rolled coil-sheet-strip - - Source2Source <- list("WSA" = as.matrix(read.csv(paste0(path$Concordance,"/WSA/WSA_Source2Source.csv"),header = FALSE)) ) - - Source2Source$WSA <- Source2Source$WSA[Code$WSA,Code$WSA] - - - # Create map to allocate mother to source: - - Mother2Source_Map <- list("WSA" = t(Source2Mother$WSA) / colSums(Source2Mother$WSA) ) - - Mother2Source_Map$WSA[is.na(Mother2Source_Map$WSA)] <- 0 # Because forgings is not form WSA, set NA to 0 - - # Create mother2mother concordance = parent to child processes - - Mother2Mother <- list("WSA" = Mother2Source_Map$WSA %*% Source2Source$WSA %*% Source2Mother$WSA ) - - colnames(Mother2Mother$WSA) <- rownames(Mother2Mother$WSA) <- Code$base$Finished - - - # Load products to end-use map from Cullen et al 2012 - - Products2EndUse <- read.csv(paste0(path$IE_Processed,"/Cullen/ProductsToEndUse.csv")) - - rownames(Products2EndUse) <- Products2EndUse$X # Write products names to row names - - Products2EndUse$X <- NULL # Delete product name column - - Products2EndUse <- as.matrix(Products2EndUse) - - # Create Source to Root and Source to mother maps: - - Source2Root_Map <- list("Cullen" = list("EndUse" = (Source2Root$Cullen$EndUse / rowSums(Source2Root$Cullen$EndUse) ), - "Product" = (Source2Root$Cullen$Product / rowSums(Source2Root$Cullen$Product) ) - ) - ) - - Source2Mother[["Cullen"]] <- list("EndUse" = Source2Root_Map$Cullen$EndUse %*% as.matrix(R2M$flow[,Code$base$Final]), - "Product" = Source2Root_Map$Cullen$Product %*% as.matrix(R2M$flow[,Code$base$Finished]) - ) - - Source2Mother$Cullen$Yields <- Source2Mother$Cullen$EndUse # Add concordance for yields - - Source2Mother$Cullen$Yields[Source2Mother$Cullen$Yields > 0] <- 1 # Set shares to 1 for yields - - - # Add mother sector names to maps: - - colnames(Source2Mother$Cullen$EndUse) <- base$product$Name[Code$base$Final] - - colnames(Source2Mother$Cullen$Product) <- base$product$Name[Code$base$Finished] - - # Translate product to end-use map to base classification of mother table: - - Products2EndUse <- t(Source2Mother$Cullen$Product) %*% Products2EndUse %*% Source2Mother$Cullen$EndUse - - rownames(Products2EndUse) <- Code$base$Finished - - # Load Yield data from Cullen et al.: - - Yields <- read.csv(paste0(path$IE_Processed,"/Cullen/FabricationYields.csv")) - - Yields <- Yields[Yields$Yield.Sector != "All products",] # Remove average yield - - Yields <- Source2Mother$Cullen$Yields * Yields$Yield.Factor # Distribute yields to base sectors - - Yields <- apply(Yields, 2, function(x) max(x, na.rm = TRUE)) # Select largest yields available - - - # Load BACI trade data: - - BACI <- read.csv(paste0(path$IE_Processed,"/BACI/BACI_",year,".csv")) - - - # Create two empty arrays for steel for the extension (Q) and for the fabrication total use (R) - - Q <- R <- as.data.frame(matrix(0,length(Code$base$Finished),nrow(IO.codes))) - - rownames(Q) <- rownames(R) <- base$flow$Name[Code$base$Finished] - - - # Loop over base regions: - - for(r in base$region$Code) - { - - map <- Source2Mother$WSA # Create Map for base region and finished steel - - colnames(map) <- Code$base$Finished - - # Loop over finished steel data feeds: - - for(p in 1:length(Code$WSA)) - { - - data <- read.csv(paste0(path$IE_Processed,"/WSA/WSA_",year,"_",Settings$FeedName[Code$WSA[p]],".csv")) - - vec <- rep(1,nrow(map)) # create empty vector - - if(r %in% data$base) # Check if region exists in production account - { - vec[p] <- filter(data,base == r) %>% pull(Quantity) # Write value in vector - } - - map <- map * vec # Add value to map - - } - - # Load forging production - data <- read.csv(paste0(path$IE_Processed,"/AligningData/Forgings_",year,".csv")) - - if(r %in% data$base) # Check if region exists in production account - { - value <- filter(data,base == r) %>% pull(Quantity) - } - - map <- rbind(map,0) # Add empty row - - map[nrow(map),colnames(map) == Code$base$Forgings] <- value - - # Aggregate across sources and transform in data table: - - df <- data.frame("Code" = Code$base$Finished, - "Production" = colSums(map), - "Import" = 0, - "Export" = 0, - "Use" = 0) - - # Read and aggregate exports and imports across trade partners: - - BACI_export <- filter(BACI,From == r) %>% select(Product,Quantity) %>% - group_by(Product) %>% summarise(Quantity = sum(Quantity)) %>% - ungroup(Product) %>% filter(Product %in% Code$base$Finished) - - BACI_import <- filter(BACI,To == r) %>% select(Product,Quantity) %>% - group_by(Product) %>% summarise(Quantity = sum(Quantity)) %>% - ungroup(Product) %>% filter(Product %in% Code$base$Finished) - - - # Write trade flows into data frame and estimate domestic use: - - df$Import[df$Code %in% BACI_import$Product] <- BACI_import$Quantity - - df$Export[df$Code %in% BACI_export$Product] <- BACI_export$Quantity - - df$Use <- df$Production + df$Import - df$Export - - - # Subtract production values of cold rolled products from hot rolled coil-sheet-strip - - Subtract <- sum(Mother2Mother$WSA[rownames(Mother2Mother$WSA) == Code$base$CoilSheetStrip,] * df$Production) - - df$Use[df$Code == Code$base$CoilSheetStrip] <- df$Use[df$Code == Code$base$CoilSheetStrip] - Subtract - - print("minimum values before adjustment to domestic production:") - print(df[df$Use < 0,]) - - df$Use[df$Use < 0] <- df$Production[df$Use < 0] # Set use to production where negative - - - print(paste0("Minimum of ",base$region$Name[r],": ",min(df$Use))) # Check min. - - - x_filter <- diag(x[IO.codes$index[IO.codes$base == r]]) # Read production of region r - - x_filter[x_filter > 0] <- 1 # Set non-zero values to 1 for filtering - - map <- Products2EndUse %*% x_filter # Apply filter - - colnames(map) <- IO.codes$commodity[IO.codes$base == r] - - - map[rownames(map) == Code$base$Forgings, c(1,2,7,8)] <- 1 # Add forgings (no information) - - map <- ( map / rowSums(map) ) * df$Use # Create map and add material use - - Scrap <- colSums(map) * (1-Yields) # Estimate scrap flows - - # Write into data frame with base industry codes - - Scrap <- data.frame("base" = base$process$Code[base$process$Type == "Final"], - "Quantity" = Scrap) - - rownames(Scrap) <- NULL - - # Write Scrap data to folder - - write.csv(Scrap,file = paste0(path$IE_Processed,"/Cullen/FabricationScrap_", - year,"_",base$region$Name[r],".csv"),row.names = FALSE) - - # Write fabrication-use data to folder - - Numbers2File(map,paste0(path$IE_Processed,"/Cullen/FabricationUse_",year, - "_",base$region$Name[r],".csv")) - - map <- map %*% diag(Yields) # Estimate useful output - - Q[,IO.codes$index[IO.codes$base == r]] <- map # Write values into extension - - } - - - # Save extension of the MFA-Waste-IO Model - - Numbers2File( Q, paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_Q.csv") ) - - - print("IEDataProcessing_PIOLab_WasteMFAIOExtensionV2 finished.") - -} \ No newline at end of file diff --git a/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_WasteMFAIOModelRunV2.R b/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_WasteMFAIOModelRunV2.R deleted file mode 100644 index 97515f0..0000000 --- a/Rscripts/IEfeeds_code/IE_subroutines/IEDataProcessing_PIOLab_WasteMFAIOModelRunV2.R +++ /dev/null @@ -1,127 +0,0 @@ -######################################### -# # -# This code runs the Waste-IO model # -# and saves the data in the # -# appropriate folders # -# # -######################################### - -IEDataProcessing_PIOLab_WasteMFAIOModelRunV2 <- function(year,path) -{ - - print("IEDataProcessing_PIOLab_WasteMFAIOModelRunV2 initiated.") - - - # Load codes and indices of model: - - IO.codes <- read.csv( paste0(path$IE_Processed,"/EXIOWasteMFAIO/IO_codes.csv")) - - IO.codes["Key"] <- paste0(IO.codes$base,"-",IO.codes$sector) - - Y.codes <- read.csv( paste0(path$IE_Processed,"/EXIOWasteMFAIO/Y_codes.csv")) - - Y.codes["Key"] <- paste0(Y.codes$base,"-",Y.codes$demand) - - - # Load model variables: - - Q <- as.matrix( read.csv(paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_Q.csv"), - header = FALSE) ) - - L <- as.matrix( read.csv(paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_L.csv"), - header = FALSE) ) - - Y <- as.matrix( read.csv(paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_Y.csv"), - header = FALSE) ) - - x <- rowSums( L %*% Y ) # Calculate gross output - - - - E <- colSums(Q)/x # Calculate direct intensity - - E[is.na(E)] <- 0 - - MP <- L*E # Calculate material mulitplier - - # 1. Estimate flows from fabrication to final product - - FP <- MP %*% diag( rowSums(Y) ) - - colnames(FP) <- rownames(FP) <- IO.codes$Key - - FP <- melt(FP) # Transfrom from wide to long format (pivot-like list) - - colnames(FP) <- c("From","To","Quantity") - - FP[,c("From","To")] <- apply(FP[,c("From","To")], c(2), as.character) - - - # Differentiate sector and region codes (from and to): - - FP <- left_join( x = FP, y = select(IO.codes,base,sector,Key), - by = c("From" = "Key"), - copy = FALSE, - suffix = c(".from",".to") ) - - FP <- left_join( x = FP, y = select(IO.codes,base,sector,Key), - by = c("To" = "Key"), - copy = FALSE, - suffix = c(".from",".to") ) - - Fabrication2Final <- select(FP,-From,-To) # Remove key (not needed anymore) - - - # 2. Estimate steel in final demand - - - FP <- Y # Create object to store data - - # Set col and row names: - - colnames(FP) <- Y.codes$Key - - rownames(FP) <- IO.codes$Key - - FP[1:nrow(Y),1:ncol(Y)] <- 0 # Set values to zero - - - # Calculate flows: - - for( i in 1:ncol(Y) ) FP[,i] <- rowSums( t(MP)*Y[,i] ) - - - FP <- melt(FP) # Transfrom from wide to long format (pivot-like list) - - colnames(FP) <- c("From","To","Quantity") - - FP[,c("From","To")] <- apply(FP[,c("From","To")], c(2), as.character) - - - # Differentiate sector and region codes (from and to): - - FP <- left_join( x = FP, y = select(IO.codes,base,sector,Key), - by = c("From" = "Key"), - copy = FALSE, - suffix = c(".from",".to") ) - - FP <- left_join( x = FP, y = select(Y.codes,base,demand,Key), - by = c("To" = "Key"), - copy = FALSE, - suffix = c(".from",".to") ) - - FinalDemand <- select(FP,-From,-To) # Remove key (not needed anymore) - - # 4. Save results to folder - - write.csv(Fabrication2Final, - file = paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_Fabrication2FinalDemand.csv"), - row.names = FALSE) - - write.csv(FinalDemand, - file = paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_FinalDemand.csv"), - row.names = FALSE) - - print("DataProcessing_PIOLab_WasteMFAIOModelRunV2 finished.") - -} \ No newline at end of file diff --git a/Rscripts/IEfeeds_code/IE_subroutines/IEFeed_PIOLab_EXIOWasteMFAIOV2.R b/Rscripts/IEfeeds_code/IE_subroutines/IEFeed_PIOLab_EXIOWasteMFAIOV2.R deleted file mode 100644 index 05c61b2..0000000 --- a/Rscripts/IEfeeds_code/IE_subroutines/IEFeed_PIOLab_EXIOWasteMFAIOV2.R +++ /dev/null @@ -1,274 +0,0 @@ -################################################# -# # -# This Feed takes EXIOBASE 3.6 and aggregating # -# the database in order to apply the # -# MFA-Waste-IO approach # -# # -################################################# - - -IEFeed_PIOLab_EXIOWasteMFAIOV2 <- function(year,path) -{ - - print("IEFeed_PIOLab_EXIOWasteMFAIOV2 initiated.") - - - # Set path tpo functions: - - fun <- list(paste0(path$Subroutines,"/Root2Base_RegionAggregator.R"), - paste0(path$Subroutines,"/Agg.R"), - paste0(path$Subroutines,"/Numbers2File.R")) - - lapply(fun,source) # Load functions - - - source(paste0(path$Subroutines,"/Root2Base_RegionAggregator.R")) - - # Load source-to-root and calculate Source2Base concordances - - Source2Root <- read.csv(paste0(path$Concordance,"/EXIOBASE/Source2Root_Region_EXIOBASE.csv"), - header = FALSE) - - # Root2Mother <- as.matrix(RegionAggregator) - - Source2Root <- as.matrix(Source2Root) - - - - Source2Root <- Source2Root/rowSums(Source2Root) # Create map from concordance - - # Root2Mother <- as.matrix(Root2Mother) - - # Create Source-to-base matrix - - Source2Mother <- Source2Root %*% R2M$region - - # Create concordance - - Source2Mother <- t(Source2Mother)*(1:ncol(Source2Mother)) - - rownames(Source2Mother) <- NULL - - Source2Mother <- melt(Source2Mother) - - Source2Mother <- filter(Source2Mother,value > 0) %>% select(-value) - - colnames(Source2Mother) <- c("MotherRegion","SourceRegion") - - - # Loading IO codes: - - Code <- list("Source" = list("Product" = read.csv(paste0(path$Raw,"/EXIOWasteMFAIO/IO_product_codes.csv")), - "Industry" = read.csv(paste0(path$Raw,"/EXIOWasteMFAIO/IO_industry_codes.csv")), - "Demand" = read.csv(paste0(path$Raw,"/EXIOWasteMFAIO/IO_finaldemand_codes.csv")) - ) - ) - - - Code$Source$Product <- left_join(Code$Source$Product,Source2Mother,by = c("RegionCode" = "SourceRegion")) - - Code$Source$Industry <- left_join(Code$Source$Industry,Source2Mother,by = c("RegionCode" = "SourceRegion")) - - Code$Source$Demand <- left_join(Code$Source$Demand,Source2Mother,by = c("RegionCode" = "SourceRegion")) - - - n_pro <- max(Code$Source$Product$MotherProductCode) # Number of manufactured products - - n_ind <- max(Code$Source$Industry$MotherIndustryCode) # Number of manufacturing industries - - n_reg <- ncol(R2M$region) # Number of regions - - - # 1. Load EXIOBASE 3.6 mrSUTs - - # Supply table (products by industry): - - S <- read.csv(paste0(path$Raw,"/EXIOWasteMFAIO/MRSUT_",year,"/supply.csv"),header = FALSE) - - S <- as.matrix(S) # Transform into matrix - - # Aggregate from source to mother classification: - - S <- Agg(S,paste0(Code$Source$Industry$MotherRegion,"-",Code$Source$Industry$MotherIndustryCode),2) - - S <- Agg(S,paste0(Code$Source$Product$MotherRegion,"-",Code$Source$Product$MotherProductCode),1) - - # Use table (products by industry): - - U <- read.csv(paste0(path$Raw,"/EXIOWasteMFAIO/MRSUT_",year,"/use.csv"),header = FALSE) - - U <- as.matrix(U) # Transform into matrix - - # Aggregate from source to mother: - - U <- Agg(U,paste0(Code$Source$Industry$MotherRegion,"-",Code$Source$Industry$MotherIndustryCode),2) - - U <- Agg(U,paste0(Code$Source$Product$MotherRegion,"-",Code$Source$Product$MotherProductCode),1) - - - # Final demand block (product by final demand category) - - Y <- read.csv(paste0(path$Raw,"/EXIOWasteMFAIO/MRSUT_",year,"/final_demand.csv"),header = FALSE) - - Y <- as.matrix(Y) # Transform into matrix - - # Aggregate from source to mother: - - Y <- Agg(Y,paste0(Code$Source$Demand$MotherRegion,"-",Code$Source$Demand$FinalDemandCode),2) - - Y <- Agg(Y,paste0(Code$Source$Product$MotherRegion,"-",Code$Source$Product$MotherProductCode),1) - - - x <- colSums(S) # Gross production of all industry - - q <- rowSums(S) # Gross production of all products - - - D <- t(S/q) # Matrix of all commodity output proportions (industry by product) - - D[is.na(D)] <- 0 # Set NaN (due to zero gross output) to zero - - C <- t(t(S)/x) # Matrix of all industry output proportions (product by industry) - - C[is.na(C)] <- 0 # Set NaN (due to zero gross output) to zero - - - B <- t(t(U)/x) # All commodity by industry coefficient matrix - - B[is.na(B)] <- 0 # Set NaN (due to zero gross output) to zero - - A <- B %*% D # Calculate pro-by-pro technology matrix - - - filter <- rep(c(0,rep(1,n_pro)),n_reg) # Create filter vector - - A_f <- diag(filter) %*% A %*% diag(filter) # Apply filter - - I <- diag( rep(1, (n_pro+1) * n_reg ) ) # Create Identity matrix - - - # Filter mrSUTs for steel containing sectors and recalculate market share matrices: - - S_f <- diag(filter) %*% S %*% diag(filter) # Filter supply table - - x_f <- colSums(S_f) # Filter industry output - - q_f <- rowSums(S_f) # Filter product output - - - D_f <- t(S_f/q_f) # Matrix of all commodity output proportions (industry by product) - - D_f[is.na(D_f)] <- 0 # Set NaN (due to zero gross output) to zero - - C_f <- t(t(S_f)/x_f) # Matrix of all industry output proportions (product by industry) - - C_f[is.na(C_f)] <- 0 # Set NaN (due to zero gross output) to zero - - - - TRM_f <- solve( I - A_f ) %*% C_f # Calculate pro-by-ind total requirement matrix - - Y_f <- D_f %*% diag(filter) %*% Y # Filter and calculate final demand by industry output - - print( sum(TRM_f %*% rowSums(Y_f)) / sum(x) ) # Share of manuf. steel in production - - - Code[["Mother"]] <- list( "Sector" = colnames(A), - "Demand" = colnames(Y) ) # Create new codes for WIO-MFA model - - - # Split colname string into region and sector code: - - Code$Mother$Sector <- as.data.frame(str_split_fixed(Code$Mother$Sector, "-", 2),stringsAsFactors = FALSE) - - Code$Mother$Demand <- as.data.frame(str_split_fixed(Code$Mother$Demand, "-", 2),stringsAsFactors = FALSE) - - # Change storage mode to numeric: - - Code$Mother$Sector <- as.data.frame(apply(Code$Mother$Sector, c(2),as.numeric)) - - Code$Mother$Demand <- as.data.frame(apply(Code$Mother$Demand, c(2),as.numeric)) - - # Add indices: - - Code$Mother$Sector["index"] <- 1:nrow(Code$Mother$Sector) - - Code$Mother$Demand["index"] <- 1:nrow(Code$Mother$Demand) - - - # Set colnames: - - colnames(Code$Mother$Sector) <- c("base","sector","index") - - colnames(Code$Mother$Demand) <- c("base","demand","index") - - - # Remove NEC sectors and export demand category (which is always zero): - - Code$Mother$Sector <- Code$Mother$Sector[Code$Mother$Sector$sector != 0,] - - Code$Mother$Demand <- Code$Mother$Demand[Code$Mother$Demand$demand != 7,] - - - # Re-order region list: - - Code$Mother$Sector <- Code$Mother$Sector[order(Code$Mother$Sector$base),] - - Code$Mother$Demand <- Code$Mother$Demand[order(Code$Mother$Demand$base),] - - - remove(A,x,q,Y,S,U) # Remove tables not needed - - - # Filter only WIO-MFA sectors: - - A <- A_f[Code$Mother$Sector$index,Code$Mother$Sector$index] - - S <- S_f[Code$Mother$Sector$index,Code$Mother$Sector$index] - - TRM <- TRM_f[Code$Mother$Sector$index,Code$Mother$Sector$index] - - Y <- Y_f[Code$Mother$Sector$index,Code$Mother$Demand$index] - - - # Adapt indices to new model classification: - - Code$Mother$Sector$index <- 1:nrow(Code$Mother$Sector) - - Code$Mother$Demand$index <- 1:nrow(Code$Mother$Demand) - - - # Check if subfolder in processed data exists and if not create it - - path_set <- paste0(path$IE_Processed,"/EXIOWasteMFAIO") - - if(!dir.exists(path_set)) dir.create(path_set) - - - # Write codes and tables to folder: - - write.csv(x = Code$Mother$Sector, - file = paste0(path$IE_Processed,"/EXIOWasteMFAIO/IO_codes.csv"), - row.names = FALSE) - - write.csv(x = Code$Mother$Demand, - file = paste0(path$IE_Processed,"/EXIOWasteMFAIO/Y_codes.csv"), - row.names = FALSE ) - - - Numbers2File(Y,paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_Y.csv")) - - Numbers2File(A,paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_A.csv")) - - Numbers2File(TRM,paste0(path$IE_Processed,"/EXIOWasteMFAIO/",year,"_L.csv")) - - - - print(paste0( "Share of final demand in total gross production: ", - round( sum(Y)/sum(TRM %*% Y),digits = 2) ) - ) - - - print("IEFeed_PIOLab_EXIOWasteMFAIOV2 finished.") - -} diff --git a/Rscripts/IEfeeds_code/Ind20Pro22v1_InitialEstimate.R b/Rscripts/IEfeeds_code/Ind20Pro22v1_InitialEstimate.R deleted file mode 100644 index 80fa928..0000000 --- a/Rscripts/IEfeeds_code/Ind20Pro22v1_InitialEstimate.R +++ /dev/null @@ -1,173 +0,0 @@ -############################################### -# # -# This is the IE data feed for processing # -# raw data of the iron and steel PIOT # -# it covers 20 processes and 22 products # -# # -############################################### -# IE feed for 20 industries/processes and 22 products base classifications -# hanspeter.wieland@wu.ac.at (c) -# 02.19.2020 - -# In case the code is executed not on the server (and the GUI) for debugging, -# the user can choose the desired region aggregator by setting the following variable -# either to 5,35 or 49. If test_regagg is not defined it will be set automatically to -# 5 regions later on in the code. -# test_regagg <- "049" - -################################################################################ -# 1. Set up environment for building the initial estimate - -IEdatafeed_name <- "Ind20Pro22v1" -print(paste0("Start of ",IEdatafeed_name," InitialEstimate.")) - -# Set library path when running on suphys server -if(Sys.info()[1] == "Linux"){ - .libPaths("/suphys/hwie3321/R/x86_64-redhat-linux-gnu-library/3.5") - # Define location for root directory - root_folder <- "/import/emily1/isa/IELab/Roots/PIOLab/"}else{ - root_folder <- "C:/Users/hwieland/Github workspace/PIOLab/"} - -# Initializing R script (load R packages and set paths to folders etc.) -source(paste0(root_folder,"Rscripts/Subroutines/InitializationR.R")) - -# Read base regions, products and codes from mat-file if available -source(paste0(path$root,"Rscripts/Subroutines/Read_BaseClassification.R")) - -# Read region aggregation from classification to set the right path for the IE data -if(max(base$region$Code) < 10) {regagg <- paste0("00",max(base$region$Code))} else -{regagg <- paste0("0",max(base$region$Code))} - -# Set additional paths that are specific to the present run -path[["IE_Subroutines"]] <- paste0(path$root,"Rscripts/IEfeeds_code/IE_subroutines") -path[["IE_Processed"]] <- paste0(path$root,"ProcessedData/",IEdatafeed_name,"/",regagg) -path[["Agg_Processed"]] <- paste0(path$root,"ProcessedData/",IEdatafeed_name) - -remove(regagg) - -# Check whether output folder for processed data for the present initial estimate exists, if not then create it -if(!dir.exists(path$Agg_Processed)) dir.create(path$Agg_Processed) - -# Check whether output folder for processed data for the specific aggregation exists, if yes, delete it -if(dir.exists(path$IE_Processed)) unlink(path$IE_Processed,recursive = TRUE) -dir.create(path$IE_Processed) - -# Check if ALANG files of old initial estimate exist and delete -source(paste0(path$Subroutines,"/DeleteALANGfilesOfOldIEfeeds.R")) - -################################################################################ -# 2. Commencing data feeds - -# Loading production values for semi- and finished steel + information on yields -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_WSA.R")) -IEFeed_PIOLab_WSA(year,path) -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_SteelIndustryYields.R")) -IEFeed_PIOLab_SteelIndustryYields(path) - -# Loading the trade data -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_BACI.R")) -IEFeed_PIOLab_BACI(year,path) - -# The extraction and ore grade feed -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_IRP.R")) -IEFeed_PIOLab_IRP(year,path) -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_Grades.R")) -IEFeed_PIOLab_Grades(path) - -# Loading end-of-life steel scrap -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_EOL.R")) -IEFeed_PIOLab_EOL(year,path) - -# Loading energy data -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_IEA.R")) -IEFeed_PIOLab_IEA(year,path) - -# Loading and aggregating EXIOBASE Waste-MFA IO version -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_EXIOWasteMFAIO.R")) -IEFeed_PIOLab_EXIOWasteMFAIO(year,path) - -# Loading fabrication yields taken from Cullen et al 2012 -source(paste0(path$IE_Subroutines,"/IEFeed_PIOLab_Cullen.R")) -IEFeed_PIOLab_Cullen(path) - -################################################################################ -# 3. Commencing data processing - -# Aligning WSA and IEA data and filling gaps in WSA accounts. -# Moreover, remove BACI trade flows of iron ores for regions where IRP reports no extraction -source(paste0(path$IE_Subroutines,"/IEDataProcessing_PIOLab_AligningData.R")) -IEDataProcessing_PIOLab_AligningData(year,path) - -# Compile extension for the MFA-Waste IO Model and estimate fabrication scrap -source(paste0(path$IE_Subroutines,"/IEDataProcessing_PIOLab_WasteMFAIOExtension.R")) -IEDataProcessing_PIOLab_WasteMFAIOExtension(year,path) - -# Run Waste-IO Model calculation -source(paste0(path$IE_Subroutines,"/IEDataProcessing_PIOLab_WasteMFAIOModelRun.R")) -IEDataProcessing_PIOLab_WasteMFAIOModelRun(year,path) - -# Compile domestic SUTs -source(paste0(path$IE_Subroutines,"/IEDataProcessing_PIOLab_BuildingDomesticTables.R")) -IEDataProcessing_PIOLab_BuildingDomesticTables(year,path) - -# Compiling trade blocks -source(paste0(path$IE_Subroutines,"/IEDataProcessing_PIOLab_BuildingTradeBlocks.R")) -IEDataProcessing_PIOLab_BuildingTradeBlocks(year,path) - -################################################################################ -# 4. Create S8 files (see AISHA manual annex for further information) for easy data import to AISHA - -source(paste0(path$IE_Subroutines,"/IEDataProcessing_PIOLab_BuildS8fromSupplyUseTables.R")) -IEDataProcessing_PIOLab_BuildS8fromSupplyUseTables(year,path) - -################################################################################ -# 5. Write ALANG commands -print("Start writing ALANG commands.") - -# Set up wrapper for adding rows to ALANG -NewALANG <- function(name,SE,ALANG) -{ - file <- paste0("S8 ",path$mother,"Data/IE/",gsub("-","",Sys.Date()), - "_PIOLab_AllCountriesS8File_",name,year,".csv") - - ALANG <- add_row(ALANG,'1' = name,Coef1 = file, S.E. = SE, - Value = "I",Incl = "Y",Parts = "1",'Row parent' = "",'Row child' = "", - 'Row grandchild' = "",'Column parent' = "",'Column child' = "", - 'Column grandchild' = "",Years = "",Margin = "",'Pre-map' = "",'Post-map' = "", - 'Pre-Map' = "",'Post-Map' = "") - - return(ALANG) -} - -n_reg <- nrow(base$region) -# Create empty file with header -source(paste0(path$Subroutines,"/makeALANGheadline.R")) - -# Write ALANG commands -ALANG <- NewALANG("Supply","E MX1;MN10;",ALANG) -ALANG <- NewALANG("Use","E MX1;MN10;CN1;",ALANG) -ALANG <- NewALANG("FinalDemand","E MX1;MN10;",ALANG) -ALANG <- NewALANG("Extraction","E MX1;MN10;",ALANG) -ALANG <- NewALANG("EolScrap","E MX1;MN10;",ALANG) -ALANG <- NewALANG("OtherInput","E MX1;MN10;",ALANG) -ALANG <- NewALANG("Waste","E MX1;MN10;",ALANG) -ALANG <- NewALANG("Zero","E CN1;",ALANG) - -ALANG$`#` <- as.character(1:nrow(ALANG)) - -# Write data frame with ALANG commands as tab-delimited txt-file to root and working directory (mother) -# Note HP: This is probably not the normal procedure, meaning no IE ALANG's in the root -filename <- paste0(path$root,"ALANGfiles/",gsub("-","",Sys.Date()), - "_PIOLab_SUT_000_InitialEstimate-",year,"_000_S8filesForAllRegionsAndFlows.txt") - -write.table(ALANG,file = filename,row.names = FALSE, quote = F,sep = "\t") -# Check if the mother directory really exists -if(file.exists(path$mother)) -{ - filename <- paste0(path$mother,gsub("-","",Sys.Date()), - "_PIOLab_SUT_000_InitialEstimate-",year,"_000_S8filesForAllRegionsAndFlows.txt") - - write.table(ALANG,file = filename,row.names = FALSE, quote = F,sep = "\t") -} - -print(paste0("End of ",IEdatafeed_name," InitialEstimate.")) diff --git a/Rscripts/IEfeeds_code/Ind30Pro40v1_InitialEstimate.R b/Rscripts/IEfeeds_code/Ind30Pro40v1_InitialEstimate.R deleted file mode 100644 index 8bf59d0..0000000 --- a/Rscripts/IEfeeds_code/Ind30Pro40v1_InitialEstimate.R +++ /dev/null @@ -1,232 +0,0 @@ -############################################### -# # -# This is the IE data feed for processing # -# raw data of the iron and steel PIOT # -# it covers 20 processes and 22 products # -# # -############################################### -# IE feed for 20 industries/processes and 22 products base classifications -# hanspeter.wieland@wu.ac.at (c) -# 02.19.2020 - -# In case the code is executed not on the server (and the GUI) for debugging, -# the user can choose the desired region aggregator by setting the following variable -# either to 5,35 or 49. If test_regagg is not defined it will be set automatically to -# 5 regions later on in the code. -# test_regagg <- "049" - -################################################################################ -# 1. Set up environment for building the initial estimate - -IEdatafeed_name <- "Ind30Pro40v1" - -print(paste0("Start of ",IEdatafeed_name," InitialEstimate.")) - -# Set library path when running on suphys server -if(Sys.info()[1] == "Linux"){ - .libPaths("/suphys/hwie3321/R/x86_64-redhat-linux-gnu-library/3.5") - # Define location for root directory - root_folder <- "/import/emily1/isa/IELab/Roots/PIOLab/"}else{ - root_folder <- "C:/Users/hwieland/Github workspace/PIOLab/"} - -# Initializing R script (load R packages and set paths to folders etc.) - -source(paste0(root_folder,"Rscripts/Subroutines/InitializationR.R")) - -# Read base regions, products and codes from mat-file if available - -source(paste0(path$root,"Rscripts/Subroutines/Read_BaseClassification.R")) - -# Read region aggregation from classification to set the right path for the IE data - -if(max(base$region$Code) < 10) - { - regagg <- paste0("00",max(base$region$Code)) - } else - { - regagg <- paste0("0",max(base$region$Code)) - } - -# Set additional paths that are specific to the present run -path[["IE_Subroutines"]] <- paste0(path$root,"Rscripts/IEfeeds_code/IE_subroutines") -path[["IE_Processed"]] <- paste0(path$root,"ProcessedData/",IEdatafeed_name,"/",regagg) -path[["Agg_Processed"]] <- paste0(path$root,"ProcessedData/",IEdatafeed_name) - -remove(regagg) - -# Check whether output folder for processed data for the present initial estimate exists, if not then create it - -if(!dir.exists(path$Agg_Processed)) dir.create(path$Agg_Processed) - -# Check whether output folder for processed data for the specific aggregation exists, if yes, delete it - -if(dir.exists(path$IE_Processed)) unlink(path$IE_Processed,recursive = TRUE) - -dir.create(path$IE_Processed) - -# Check if ALANG files of old initial estimate exist and delete - -source(paste0(path$Subroutines,"/DeleteALANGfilesOfOldIEfeeds.R")) - -# Functions to process raw data for Initial Estimate - -IE_fun <- list("/IEFeed_PIOLab_WSA.R", - "/IEFeed_PIOLab_SteelIndustryYields.R", - "/IEFeed_PIOLab_BACI.R", - "/IEFeed_PIOLab_IRP.R", - "/IEFeed_PIOLab_Grades.R", - "/IEFeed_PIOLab_EOL.R", - "/IEFeed_PIOLab_IEA.R", - "/IEFeed_PIOLab_EXIOWasteMFAIOV2.R", - "/IEFeed_PIOLab_Cullen.R", - "/IEDataProcessing_PIOLab_AligningDataV2.R", - "/IEDataProcessing_PIOLab_WasteMFAIOExtensionV2.R", - "/IEDataProcessing_PIOLab_WasteMFAIOModelRunV2.R", - "/IEDataProcessing_PIOLab_BuildingDomesticTablesV2.R", - "/IEDataProcessing_PIOLab_BuildingTradeBlocks.R", - "/IEDataProcessing_PIOLab_BuildS8fromSupplyUseTables.R") - -IE_fun <- paste0(path$IE_Subroutines,IE_fun) # Add path to functions - -lapply(IE_fun,source) # Load functions into workspace - - -# 2. Commencing data pre-processing (from source to root classification) - -IEFeed_PIOLab_WSA(year,path) # WSA production numbers - -IEFeed_PIOLab_SteelIndustryYields(path) # Yield information - -IEFeed_PIOLab_BACI(year,path) # Trade data - -IEFeed_PIOLab_IRP(year,path) # Extraction data - -IEFeed_PIOLab_Grades(path) # Ore grades - -IEFeed_PIOLab_EOL(year,path) # end-of-life i.e. old scrap - -IEFeed_PIOLab_IEA(year,path) # IEA energy data - -IEFeed_PIOLab_EXIOWasteMFAIOV2(year,path) # Aggregate EXIOBASE Waste-MFA IO model (WIO) - -IEFeed_PIOLab_Cullen(path) # Fabrication yields from Cullen et al. 2012 - - -# 3. Commencing data processing - -IEDataProcessing_PIOLab_AligningDataV2(year,path) # Align WSA, IRP extraction - -IEDataProcessing_PIOLab_WasteMFAIOExtensionV2(year,path) # Compile extension for WIO - -IEDataProcessing_PIOLab_WasteMFAIOModelRunV2(year,path) # Run WIO Model calculation - - - -# Compile domestic SUTs - -IEDataProcessing_PIOLab_BuildingDomesticTablesV2(year,path) - -# Compiling trade blocks - -IEDataProcessing_PIOLab_BuildingTradeBlocks(year,path) - -################################################################################ -# 4. Create S8 files (see AISHA manual annex for further information) for easy data import to AISHA - -IEDataProcessing_PIOLab_BuildS8fromSupplyUseTables(year,path) - -################################################################################ -# 5. Write ALANG commands -print("Start writing ALANG commands.") - -# Set up wrapper for adding rows to ALANG -NewALANG <- function(name,SE,ALANG) -{ - file <- paste0("S8 ",path$mother,"Data/IE/",gsub("-","",Sys.Date()), - "_PIOLab_AllCountriesS8File_",name,year,".csv") - - ALANG <- add_row(ALANG,'1' = name,Coef1 = file, S.E. = SE, - Value = "I",Incl = "Y",Parts = "1",'Row parent' = "",'Row child' = "", - 'Row grandchild' = "",'Column parent' = "",'Column child' = "", - 'Column grandchild' = "",Years = "",Margin = "",'Pre-map' = "",'Post-map' = "", - 'Pre-Map' = "",'Post-Map' = "") - - return(ALANG) -} - -# n_reg <- nrow(base$region) -# Create empty file with header -source(paste0(path$Subroutines,"/makeALANGheadline.R")) - -RSE <- read.xlsx(xlsxFile = paste0(path$Settings,"/datafeeds_settings/IE_RSE_settings.xlsx")) - -# Write ALANG commands - -name <- "Supply" -RSE_sel <- RSE[RSE$item == name,] -ALANG <- NewALANG(name, - paste0("E MX",RSE_sel$MX,";MN",RSE_sel$MN,";"), - ALANG) - -name <- "Use" -RSE_sel <- RSE[RSE$item == name,] -ALANG <- NewALANG(name, - paste0("E MX",RSE_sel$MX,";MN",RSE_sel$MN,";CN",RSE_sel$CN,";"), - ALANG) - -name <- "FinalOutput" -RSE_sel <- RSE[RSE$item == name,] -ALANG <- NewALANG(name, - paste0("E MX",RSE_sel$MX,";MN",RSE_sel$MN,";"), - ALANG) - -name <- "Extraction" -RSE_sel <- RSE[RSE$item == name,] -ALANG <- NewALANG(name, - paste0("E MX",RSE_sel$MX,";MN",RSE_sel$MN,";"), - ALANG) - -name <- "EolScrap" -RSE_sel <- RSE[RSE$item == name,] -ALANG <- NewALANG(name, - paste0("E MX",RSE_sel$MX,";MN",RSE_sel$MN,";"), - ALANG) - -name <- "OtherInput" -RSE_sel <- RSE[RSE$item == name,] -ALANG <- NewALANG(name, - paste0("E MX",RSE_sel$MX,";MN",RSE_sel$MN,";"), - ALANG) - -name <- "Waste" -RSE_sel <- RSE[RSE$item == name,] -ALANG <- NewALANG(name, - paste0("E MX",RSE_sel$MX,";MN",RSE_sel$MN,";"), - ALANG) - -name <- "Zero" -RSE_sel <- RSE[RSE$item == name,] -ALANG <- NewALANG(name, - paste0("E CN",RSE_sel$CN,";"), - ALANG) - -ALANG$`#` <- as.character(1:nrow(ALANG)) - -# Write data frame with ALANG commands as tab-delimited txt-file to root and working directory (mother) -# Note HP: This is probably not the normal procedure, meaning no IE ALANG's in the root -filename <- paste0(path$root,"ALANGfiles/",gsub("-","",Sys.Date()), - "_PIOLab_SUT_000_InitialEstimate-",year,"_000_S8filesForAllRegionsAndFlows.txt") - -write.table(ALANG,file = filename,row.names = FALSE, quote = F,sep = "\t") - -# Check if the mother directory really exists - -if(file.exists(path$mother)) -{ - filename <- paste0(path$mother,gsub("-","",Sys.Date()), - "_PIOLab_SUT_000_InitialEstimate-",year,"_000_S8filesForAllRegionsAndFlows.txt") - - write.table(ALANG,file = filename,row.names = FALSE, quote = F,sep = "\t") -} - -print(paste0("End of ",IEdatafeed_name," InitialEstimate.")) diff --git a/Rscripts/datafeeds_code/datafeed_PIOLab_IRPexports.R b/Rscripts/datafeeds_code/datafeed_PIOLab_IRPexports.R deleted file mode 100644 index e932152..0000000 --- a/Rscripts/datafeeds_code/datafeed_PIOLab_IRPexports.R +++ /dev/null @@ -1,137 +0,0 @@ -################################################################################ - -datafeed_name <- "IRPexports" -print(paste0("datafeed_PIOLab_",datafeed_name," initiated.")) - -################################################################################ -# Set library path when running on suphys server -if(Sys.info()[1] == "Linux"){ - .libPaths("/suphys/hwie3321/R/x86_64-redhat-linux-gnu-library/3.5") - # Define location for root directory - root_folder <- "/import/emily1/isa/IELab/Roots/PIOLab/"}else{ - root_folder <- "C:/Users/hwieland/Github workspace/PIOLab/"} -################################################################################ - -# Initializing R script (load R packages and set paths to folders etc.) -source(paste0(root_folder,"Rscripts/Subroutines/InitializationR.R")) - -path["df_Processed"] <- paste0(path$Processed,"/",datafeed_name) - -# Load function to write arrays to files -source(paste0(path$Subroutines,"/Numbers2File.R")) - -# Check if folder with processed data exists, in case delete and create empty one - -if(dir.exists(path$df_Processed)) unlink(path$df_Processed,recursive = TRUE) - -dir.create(path$df_Processed) - -# Loading raw data -data <- read.csv(paste0(path$Raw,"/IRP/all_CCC_Exp_ResearchDB.csv"),stringsAsFactors=FALSE) -colnames(data)[6:49] <- 1970:2013 -data <- data %>% filter(CCC_IEATrade_Name == "Iron ores") %>% select(Country,AlphaNumISO,as.character(year)) -# Remove NA -data <- data[!is.na(data$`2008`),] - -# transform 3-digit ISO codes and translate into root classification, first load the root -data <- data %>% separate(AlphaNumISO, into = c('ISOCode', 'num'), sep = 3) %>% select(-num) -colnames(data)[ncol(data)] <- "Quantity" -data <- filter(data,Quantity > 0) -# Look up root codes -data <- left_join(data,root$region[,c("Code","RootCountryAbbreviation")],by = c("ISOCode" = "RootCountryAbbreviation"),copy = FALSE) - -# No root codes for Faroe Islands and Mayotte (remove for now and talk Manfred/Arne) -data <- data[!is.na(data$Code),] - -# Remove Yugoslavia and USSR from data -data <- data %>% filter(!Code %in% c(233,242)) - -data <- data[!is.na(data$Code),] # Mayotte and Farour Isl. are not in root (tbc) - -n_reg <- nrow(root$region) - -# Read standard errors: - -RSE <- filter(read.xlsx(path$RSE_settings),Item == datafeed_name) - -data_new <- data.frame("code" = 1:n_reg,"RHS" = 0) - -data_new$RHS[data$Code] <- data$Quantity - -data <- data_new - -remove(data_new) - - -ConcoReg <- diag(nrow(root$region)) # Create pseudo aggregator (for columns) - -# Set names and paths to data and concordances: - -filename <- list("RHS" = paste0("/",datafeed_name,"/",datafeed_name,"_RHS_",year,".csv"), - "ConcoReg" = "/Root2Root_Reg_Concordance.csv") - -Numbers2File( t(data$RHS), paste0(path$Processed,filename$RHS)) # Save S2R reg aggregator - -Numbers2File( ConcoReg, paste0(path$Concordance,filename$ConcoReg)) # Save S2R reg aggregator - - -# Create empty ALANG table with header: - -source(paste0(path$Subroutines,"/makeALANGheadline.R")) # Create ALANG header - -ALANG <- ALANG[,c(1:19,11:19)] # Extend table with additional columns - -ALANG <- add_row(ALANG,'1' = "DataFeed IRP export") # Create command - -ALANG$Value <- paste0("DATAPATH",filename$RHS) - -ALANG$S.E. <- paste0("E MX",RSE$Maximum,"; MN",RSE$Minimum,";") - - -# Write first 8-tuple (sum of domestic use and imports for each region) - -ALANG$Coef1 <- "-1" - -ALANG$Years <- "1" -ALANG$Margin <- "1" - -ALANG$`Row parent` <- paste0("1:e a CONCPATH",filename$ConcoReg) -ALANG$`Row child` <- "2" -ALANG$`Row grandchild` <- "1-e" - -ALANG$`Column parent` <- "1:e~3" -ALANG$`Column child` <- "1" -ALANG$`Column grandchild` <- "1-e" - -# Write second 8-tuple (subtract sum of domestic use table) - -ALANG$Coef1.1 <- "1" - -ALANG$Years.1 <- "1" -ALANG$Margin.1 <- "1" - -ALANG$`Row parent.1` <- "1:e" -ALANG$`Row child.1` <- "2" -ALANG$`Row grandchild.1` <- "1-e" - -ALANG$`Column parent.1` <- "1-e" -ALANG$`Column child.1` <- "1-e" -ALANG$`Column grandchild.1` <- "1-e" - -ALANG$`#` <- as.character(1:nrow(ALANG)) -ALANG$Incl <- "Y" -ALANG$Parts <- "2" - -ALANG$`Pre-map` <- "" -ALANG$`Post-map` <- "" -ALANG$`Pre-Map` <- "" -ALANG$`Post-Map` <- "" - - -# Call script that writes the ALANG file to the repsective folder in the root -source(paste0(path$root,"Rscripts/datafeeds_code/datafeed_subroutines/WriteALANG2Folder.R")) - -print(paste0("datafeed_PIOLab_",datafeed_name," finished.")) - -rm(list = ls()) # clear workspace - diff --git a/Rscripts/datafeeds_code/datafeed_PIOLab_IRPimports.R b/Rscripts/datafeeds_code/datafeed_PIOLab_IRPimports.R deleted file mode 100644 index 1fb93bc..0000000 --- a/Rscripts/datafeeds_code/datafeed_PIOLab_IRPimports.R +++ /dev/null @@ -1,139 +0,0 @@ -################################################################################ - -datafeed_name <- "IRPimports" -print(paste0("datafeed_PIOLab_",datafeed_name," initiated.")) - -################################################################################ -# Set library path when running on suphys server -if(Sys.info()[1] == "Linux"){ - .libPaths("/suphys/hwie3321/R/x86_64-redhat-linux-gnu-library/3.5") - # Define location for root directory - root_folder <- "/import/emily1/isa/IELab/Roots/PIOLab/"}else{ - root_folder <- "C:/Users/hwieland/Github workspace/PIOLab/"} -################################################################################ - -# Initializing R script (load R packages and set paths to folders etc.) - -source(paste0(root_folder,"Rscripts/Subroutines/InitializationR.R")) - -path["df_Processed"] <- paste0(path$Processed,"/",datafeed_name) - -source(paste0(path$Subroutines,"/Numbers2File.R")) # Load fun. to write arrays to files - - -# Check if folder with processed data exists, in case delete and create empty one - -if(dir.exists(path$df_Processed)) unlink(path$df_Processed,recursive = TRUE) - -dir.create(path$df_Processed) - - -# Loading raw data -data <- read.csv(paste0(path$Raw,"/IRP/all_CCC_Imp_ResearchDB.csv"),stringsAsFactors=FALSE) -colnames(data)[6:49] <- 1970:2013 -data <- data %>% filter(CCC_IEATrade_Name == "Iron ores") %>% select(Country,AlphaNumISO,as.character(year)) -# Remove NA -data <- data[!is.na(data$`2008`),] - -data <- data %>% separate(AlphaNumISO, into = c('ISOCode', 'num'), sep = 3) %>% - select(-num) - -colnames(data)[ncol(data)] <- "Quantity" -data <- filter(data,Quantity > 0) - -# Remove Yugoslavia and USSR from data -data <- data %>% filter(!ISOCode %in% c("YUG","SUN")) - -# Look up root codes -data <- left_join(data,root$region[,c("Code","RootCountryAbbreviation")], - by = c("ISOCode" = "RootCountryAbbreviation"),copy = FALSE) %>% - select(Code,Quantity) - -data <- data[!is.na(data$Code),] # Mayotte and Farour Isl. are not in root (tbc) - -RSE <- filter(read.xlsx(path$RSE_settings),Item == datafeed_name) # Import RSE - -# # Add standard errors -# source(paste0(path$Subroutines,"/SE_LogRegression.R")) -# data <- SE_LogRegression(data,RSE$Minimum,RSE$Maximum) - -n_reg <- nrow(root$region) # Read number of root regions - -data_new <- data.frame("code" = 1:n_reg,"RHS" = 0) - -data_new$RHS[data$Code] <- data$Quantity - -data <- data_new - -remove(data_new) - - -ConcoReg <- diag(nrow(root$region)) # Create pseudo aggregator (for columns) - -# Set names and paths to data and concordances: - -filename <- list("RHS" = paste0("/",datafeed_name,"/",datafeed_name,"_RHS_",year,".csv"), - "ConcoReg" = "/Root2Root_Reg_Concordance.csv") - -Numbers2File( t(data$RHS), paste0(path$Processed,filename$RHS)) # Save S2R reg aggregator - -Numbers2File( ConcoReg, paste0(path$Concordance,filename$ConcoReg)) # Save S2R reg aggregator - - -source(paste0(path$Subroutines,"/makeALANGheadline.R")) # Create ALANG header - -ALANG <- ALANG[,c(1:19,11:19)] # Extend table with additional columns - -ALANG <- add_row(ALANG,'1' = "DataFeed IRP imports") # Create command - -ALANG$Value <- paste0("DATAPATH",filename$RHS) - -ALANG$S.E. <- paste0("E MX",RSE$Maximum,"; MN",RSE$Minimum,";") - -# Write first 8-tuple (sum of domestic use and imports for each region) - -ALANG$Coef1 <- "-1" - -ALANG$Years <- "1" -ALANG$Margin <- "1" - -ALANG$`Row parent` <- paste0("1:e a CONCPATH",filename$ConcoReg) -ALANG$`Row child` <- "2" -ALANG$`Row grandchild` <- "1-e" - -ALANG$`Column parent` <- "1:e~3" -ALANG$`Column child` <- "1" -ALANG$`Column grandchild` <- "1-e" - -# Write second 8-tuple (subtract sum of domestic use table) - -ALANG$Coef1.1 <- "1" - -ALANG$Years.1 <- "1" -ALANG$Margin.1 <- "1" - -ALANG$`Row parent.1` <- "1-e" -ALANG$`Row child.1` <- "2" -ALANG$`Row grandchild.1` <- "1-e" - -ALANG$`Column parent.1` <- "1:e" -ALANG$`Column child.1` <- "1" -ALANG$`Column grandchild.1` <- "1-e" - -ALANG$`#` <- as.character(1:nrow(ALANG)) -ALANG$Incl <- "Y" -ALANG$Parts <- "2" - -ALANG$`Pre-map` <- "" -ALANG$`Post-map` <- "" -ALANG$`Pre-Map` <- "" -ALANG$`Post-Map` <- "" - -# Call script that writes the ALANG file to the repsective folder in the root - -source(paste0(path$root,"Rscripts/datafeeds_code/datafeed_subroutines/WriteALANG2Folder.R")) - -print(paste0("datafeed_PIOLab_",datafeed_name," finished.")) - -rm(list = ls()) # clear workspace - diff --git a/Settings/Root/Legends/._RootRegionLegend.xlsx b/Settings/Root/Legends/._RootRegionLegend.xlsx deleted file mode 100644 index c51f873..0000000 Binary files a/Settings/Root/Legends/._RootRegionLegend.xlsx and /dev/null differ diff --git a/Settings/Root/Legends/._RootSectorLegend.xlsx b/Settings/Root/Legends/._RootSectorLegend.xlsx deleted file mode 100644 index 4478dc5..0000000 Binary files a/Settings/Root/Legends/._RootSectorLegend.xlsx and /dev/null differ diff --git a/Settings/Root/Legends/.~lock.RootRegionLegend.xlsx# b/Settings/Root/Legends/.~lock.RootRegionLegend.xlsx# deleted file mode 100644 index 80fff98..0000000 --- a/Settings/Root/Legends/.~lock.RootRegionLegend.xlsx# +++ /dev/null @@ -1 +0,0 @@ -,hwie3321,gateway.physics.usyd.edu.au,26.02.2020 13:19,file:///suphys/hwie3321/.config/libreoffice/4; \ No newline at end of file diff --git a/Settings/Root/Legends/RootRegionLegend.xlsx b/Settings/Root/Legends/RootRegionLegend.xlsx deleted file mode 100644 index 40e765e..0000000 Binary files a/Settings/Root/Legends/RootRegionLegend.xlsx and /dev/null differ diff --git a/Settings/Root/Legends/RootSectorLegend.xlsx b/Settings/Root/Legends/RootSectorLegend.xlsx deleted file mode 100644 index 6ad69b8..0000000 Binary files a/Settings/Root/Legends/RootSectorLegend.xlsx and /dev/null differ diff --git a/Settings/datafeeds_settings/IE_RSE_settings.xlsx b/Settings/datafeeds_settings/IE_RSE_settings.xlsx deleted file mode 100644 index 713c338..0000000 Binary files a/Settings/datafeeds_settings/IE_RSE_settings.xlsx and /dev/null differ diff --git a/Settings/datafeeds_settings/IE_settings.xlsx b/Settings/datafeeds_settings/IE_settings.xlsx deleted file mode 100644 index 7f3fda2..0000000 Binary files a/Settings/datafeeds_settings/IE_settings.xlsx and /dev/null differ diff --git a/Settings/datafeeds_settings/RSE_settings.xlsx b/Settings/datafeeds_settings/RSE_settings.xlsx deleted file mode 100644 index a5290f6..0000000 Binary files a/Settings/datafeeds_settings/RSE_settings.xlsx and /dev/null differ diff --git a/datafeeds_code/datafeed_PIOLab_IRPexports.m b/datafeeds_code/datafeed_PIOLab_IRPexports.m deleted file mode 100644 index 468137a..0000000 --- a/datafeeds_code/datafeed_PIOLab_IRPexports.m +++ /dev/null @@ -1,5 +0,0 @@ -function datafeed_PIOLab_IRPexports(handles) - -system('Rscript /import/emily1/isa/IELab/Roots/PIOLab/Rscripts/datafeeds_code/datafeed_PIOLab_IRPexports.R','-echo'); - -end \ No newline at end of file diff --git a/datafeeds_code/datafeed_PIOLab_IRPimports.m b/datafeeds_code/datafeed_PIOLab_IRPimports.m deleted file mode 100644 index 7ec22a9..0000000 --- a/datafeeds_code/datafeed_PIOLab_IRPimports.m +++ /dev/null @@ -1,5 +0,0 @@ -function datafeed_PIOLab_IRPimports(handles) - -system('Rscript /import/emily1/isa/IELab/Roots/PIOLab/Rscripts/datafeeds_code/datafeed_PIOLab_IRPimports.R','-echo'); - -end \ No newline at end of file