Show results from RoW separately in results matrix
We might want to make it optional in the result calculation and not the default unless we're sure it won't interfere with pkg functions operating on the result objects
We might want to make it optional in the result calculation and not the default unless we're sure it won't interfere with pkg functions operating on the result objects
Good plan that will expedite the implementation as well
We might want to make it optional in the result calculation and not the default unless we're sure it won't interfere with pkg functions operating on the result objects
Good plan that will expedite the implementation as well
I will add the parameter in
did this in https://github.com/USEPA/useeior/commit/455b406050dac84623b7a1b086fa8f6da0f70808 and https://github.com/USEPA/useeior/commit/f9f1ab437de25c41a620622201eac9af40a16054
tested with this code
library(devtools)
load_all()
model <- buildModel("USEEIOv2.3-s-GHG-19")
model <- buildModel("MEEEIOv1.1-GHGc-20",configpaths = "../USEEIO-State/model_specs/ME/MEEEIOv1.1-GHGc-20.yml")
loc <- model$specs$ModelRegionAcronyms[1]
r_noRoW_f <- calculateEEIOModel(model, perspective="FINAL", demand = "Consumption", location = loc,
use_domestic_requirements = FALSE, household_emissions = TRUE, show_RoW = FALSE)
r_RoW_f <- calculateEEIOModel(model, perspective="FINAL", demand = "Consumption", location = loc,
use_domestic_requirements = FALSE, household_emissions = TRUE, show_RoW = TRUE)
colSums(r_noRoW_f$LCI_f) == colSums(r_RoW_f$LCI_f)
r_noRoW_d <- calculateEEIOModel(model, perspective="DIRECT", demand = "Consumption", location = loc,
use_domestic_requirements = FALSE, household_emissions = TRUE, show_RoW = FALSE)
r_RoW_d <- calculateEEIOModel(model, perspective="DIRECT", demand = "Consumption", location = loc,
use_domestic_requirements = FALSE, household_emissions = TRUE, show_RoW = TRUE)
all.equal(colSums(r_noRoW_d$LCI_d),colSums(r_RoW_f$LCI_f))
all.equal(colSums(r_RoW_d$LCI_d),colSums(r_RoW_f$LCI_f))
all.equal(colSums(r_noRoW_d$LCI_d),colSums(r_RoW_f$LCI_f))
those statements return TRUE
Also my recommendation is some refactoring..its a very long set of operations with a lot of redundancy in the direct and final IF clauses
ok are you still working on this now or should I take over?
The RoW block does not have an F010 record. This is 0 by definition but I think its better to add it in - otherwise it requires an adjustment to line up results by region