Skip to content

Commit

Permalink
Merge branch 'develop' into issue_311
Browse files Browse the repository at this point in the history
  • Loading branch information
bl-young committed Oct 30, 2024
2 parents e232ca1 + 9cfe575 commit 0910392
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 14 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ export(heatmapSatelliteTableCoverage)
export(heatmapSectorRanking)
export(normalizeResultMatrixByTotalImpacts)
export(plotMatrixCoefficient)
export(print2RValidationResults)
export(printValidationResults)
export(seeAvailableModels)
export(validate2RCommodityTotals)
export(writeModelMatrices)
export(writeModelforAPI)
export(writeModeltoXLSX)
Expand Down
3 changes: 0 additions & 3 deletions R/StateiorFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ prepare2RDemand <- function(model, location, domestic, demand_type = "Production

#' Run validation checks for 2R models and print to console
#' @param model A complete 2R EEIO model: a list with USEEIO model components and attributes
#' @return A list with 2R model results.
#' @export
print2RValidationResults <- function(model) {

# Check that Production demand can be run without errors
Expand Down Expand Up @@ -258,7 +256,6 @@ print2RValidationResults <- function(model) {
#' Validate commodity totals between 2R Use table, Make table, and total commodity output objects
#' @param model A complete 2R EEIO model: a list with USEEIO model components and attributes
#' @return A list containing failures of commodity total comparisons between various model objects.
#' @export
validate2RCommodityTotals <- function(model) {

failures_ls <- list()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
337,Furniture and related products,Furniture and shelving
339,Miscellaneous manufacturing,"Medical supplies, entertainment and sporting goods, fashion goods, advertising products"
311FT,Food and beverage and tobacco products,Food and beverage and tobacco products
313TT,Textile mills and textile product mills,Textiles and textile-dervied products (except clothes)
313TT,Textile mills and textile product mills,Textiles and textile-derived products (except clothes)
315AL,Apparel and leather and allied products,Clothing and leather
322,Paper products,Paper products and paper production facilities
323,Printing and related support activities,Print media and printing support
Expand Down
4 changes: 2 additions & 2 deletions inst/extdata/USEEIO_Commodity_Meta.csv
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,12 @@ V00300,Gross operating surplus,,,
337,Furniture and shelving,31-33: Manufacturing,,
339,"Medical supplies, entertainment and sporting goods, fashion goods, advertising products",31-33: Manufacturing,,
311FT,Food and beverage and tobacco products,31-33: Manufacturing,,
313TT,Textiles and textile-dervied products (except clothes),31-33: Manufacturing,,
313TT,Textiles and textile-derived products (except clothes),31-33: Manufacturing,,
315AL,Clothing and leather,31-33: Manufacturing,,
322,Paper products and paper production facilities,31-33: Manufacturing,,
323,Print media and printing support,31-33: Manufacturing,,
324,"Petroleum fuels, asphalt, and other petroleum and coal products",31-33: Manufacturing,,
325,"Agricultural, pharamceutical, industrial, and commercial chemicals",31-33: Manufacturing,,
325,"Agricultural, pharmaceutical, industrial, and commercial chemicals",31-33: Manufacturing,,
326,Plastics and rubber products,31-33: Manufacturing,,
42,Wholesale trade,42: Wholesale Trade,,
441,Vehicles and parts sales,44-45: Retail Trade,,
Expand Down
3 changes: 0 additions & 3 deletions man/print2RValidationResults.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/modelspecs/GAEEIOv1.0-GHG-19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ DemandVectors:
DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file

# ImportFactors:
# StaticFile: "useeior/US_summary_import_factors_exio_2019_17sch.csv"
# StaticFile: "useeior/US_summary_import_factors_exio_2019_12sch.csv"
# FileLocation: "DataCommons"
4 changes: 2 additions & 2 deletions tests/test_model_build.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ writeModeltoXLSX(model, ".")

## StateEEIOv1.1 Two-region Summary model with Import Factors
cfg <- c(paste0("modelspecs/", m, ".yml"),
"US_summary_import_factors_exio_2019_17sch.csv"
"US_summary_import_factors_exio_2019_12sch.csv"
)
model <- useeior:::initializeModel(m, configpaths = file.path(cfg))
model$specs$Model <- "GAEEIOv1.1-GHG-19-IF"
model$specs$ExternalImportFactors <- TRUE
model$specs$ImportFactors <- list()
model$specs$ImportFactors$StaticFile <- "useeior/US_summary_import_factors_exio_2019_17sch.csv"
model$specs$ImportFactors$StaticFile <- "useeior/US_summary_import_factors_exio_2019_12sch.csv"
model$specs$ImportFactors$FileLocation <- "DataCommons"
model <- useeior:::loadIOData(model, file.path(cfg))
model <- useeior:::loadandbuildSatelliteTables(model)
Expand Down

0 comments on commit 0910392

Please sign in to comment.