Skip to content

Commit b042a75

Browse files
authored
Merge pull request #341 from USEPA/release_v1.7.1
Release v1.7.1
2 parents 3c10c96 + 7709a47 commit b042a75

File tree

7 files changed

+85
-23
lines changed

7 files changed

+85
-23
lines changed

.github/workflows/generate-2R-model.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
model:
99
description: "Model"
1010
required: true
11-
default: "GAEEIOv1.0-s-WAT-12"
11+
default: "GAEEIOv1.0-GHG-19"
1212

1313
jobs:
1414
build:
@@ -21,7 +21,7 @@ jobs:
2121
R_KEEP_PKG_SOURCE: yes
2222

2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
2727

@@ -52,14 +52,14 @@ jobs:
5252

5353
- name: Upload check results
5454
if: failure() # if any of the previous steps fail, export a log
55-
uses: actions/upload-artifact@main
55+
uses: actions/upload-artifact@v4
5656
with:
5757
name: results
5858
path: check
5959

6060
- name: Upload files
6161
if: always()
62-
uses: actions/upload-artifact@v3.1.1
62+
uses: actions/upload-artifact@v4
6363
with:
6464
name: "${{ github.event.inputs.model }}"
6565
path: | # uses local user data dir for ubuntu

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: useeior
22
Type: Package
33
Title: USEEIO R modeling software
4-
Version: 1.7.0
5-
Date: 2025-3-3
4+
Version: 1.7.1
5+
Date: 2025-4-28
66
Authors@R: c(
77
person("Ben","Young", email="[email protected]", role="aut"),
88
person("Jorge","Vendries", email="[email protected]", role="aut"),

R/BuildModel.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ buildTwoRegionModels <- function(modelname, configpaths = NULL, validate = FALSE
334334
model <- loadDemandVectors(model)
335335
model <- constructEEIOMatrices(model)
336336
if (validate) {
337-
print2RValidationResults(model)
337+
printValidationResults(model)
338338
}
339339
model_ls[[state]] <- model
340340
},

R/LoadIOTables.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,11 @@ loadCommodityandIndustryOutput <- function(model) {
380380
model$IndustryOutput <- getTwoRegionIOData(model, "IndustryOutput")
381381
model$CommodityOutput <- getTwoRegionIOData(model, "CommodityOutput")
382382
# Load multi-year industry and commodity output
383-
years <- as.character(2012:2020)
383+
if(model$specs$BaseIOSchema == 2017) {
384+
years <- as.character(2017:2023)
385+
} else {
386+
years <- as.character(2012:2020)
387+
}
384388
tmpmodel <- model
385389
model$MultiYearIndustryOutput <- as.data.frame(model$IndustryOutput)[, FALSE]
386390
model$MultiYearCommodityOutput <- as.data.frame(model$CommodityOutput)[, FALSE]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- badges: start -->
33
[![R CI/CD test](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USEPA/useeior/actions/workflows/R-CMD-check.yaml)
44
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)
5-
[![useeior v1.0.0](http://img.shields.io/badge/useeior%20v1.0.0-10.5281/zenodo.6370101-blue.svg)](https://doi.org/10.5281/zenodo.6370101)
5+
[![useeior DOI](http://img.shields.io/badge/useeior%20DOI-10.5281/zenodo.7020213-blue.svg)](https://doi.org/10.5281/zenodo.7020213)
66
[![useeior paper](http://img.shields.io/badge/useeior%20paper-10.3390/app12094469-blue.svg)](https://doi.org/10.3390/app12094469)
77
<!-- badges: end -->
88

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Model: "GAEEIOv1.3-pecan-22"
2+
BaseIOSchema: 2017
3+
BaseIOLevel: "Summary"
4+
Alias: "pecan"
5+
IOYear: 2022 # Year for IO data
6+
ModelRegionAcronyms: ["US-GA", "RoUS"]
7+
ModelType: "EEIO"
8+
IODataSource: "stateior"
9+
IODataVersion: "0.4.0"
10+
BasePriceType: "PRO" #producer
11+
BasewithRedefinitions: FALSE
12+
CommodityorIndustryType: "Commodity"
13+
ScrapIncluded: FALSE
14+
DisaggregationSpecs: null
15+
ExternalImportFactors: TRUE
16+
17+
SatelliteTable:
18+
GHG:
19+
FullName: "Greenhouse Gases"
20+
Abbreviation: "GHG"
21+
StaticSource: TRUE
22+
StaticFile: "flowsa/FlowBySector/GHG_state_2022_m1_v2.0.5_5baf11c.parquet"
23+
FileLocation: "DataCommons"
24+
DataYears: [2022]
25+
Locations: ["US"]
26+
SectorListSource: "NAICS"
27+
SectorListYear: 2017
28+
SectorListLevel: "6"
29+
OriginalFlowSource: "FEDEFLv1.3.0"
30+
ScriptFunctionCall: "getFlowbySectorCollapsed" #function to call for script
31+
ScriptFunctionParameters: null
32+
DataSources:
33+
USEPA_GHG_2024:
34+
Title: "GHG Inventory"
35+
Author: "USEPA"
36+
DataYear: 2022
37+
URL: "https://www.epa.gov/ghgemissions/inventory-us-greenhouse-gas-emissions-and-sinks-1990-2022"
38+
Primary: TRUE
39+
40+
Indicators:
41+
GreenhouseGases:
42+
Name: "Greenhouse Gases"
43+
Code: "GHG"
44+
Group: "Impact Potential"
45+
Unit: "kg CO2 eq"
46+
SimpleUnit: "Kilograms Carbon Dioxide (CO2)"
47+
SimpleName: "Greenhouse Gases"
48+
StaticSource: TRUE
49+
StaticFile: "lciafmt/ipcc/IPCC_v1.1.1_27ba917.parquet"
50+
FileLocation: "DataCommons"
51+
ScriptFunctionCall: "getImpactMethod" #function to call for script
52+
ScriptFunctionParameters:
53+
indicators: ["AR6-100"]
54+
DataSources:
55+
IPCC_AR6:
56+
Title: "IPCC Sixth Assessment Report: Direct Global Warming Potentials for 100 year time horizon"
57+
Author: "IPCC"
58+
DataYear: 2021
59+
URL: ""
60+
Primary: TRUE
61+
62+
DemandVectors:
63+
DefaultDemand: "DefaultDemandVectors" # Name of default demand vectors yml file
64+
65+
ImportFactors:
66+
StaticFile: "useeior/US_summary_import_factors_exio_2022_17sch.csv"
67+
FileLocation: "DataCommons"

tests/test_model_build.R

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ testVisualizationFunctions(model)
167167
# model <- useeior:::initializeModel(m)
168168
# model$specs$Model <- "GAEEIOv1.2-milkbar-19"
169169
# model$specs$IODataVersion <- "0.3.0" # required for disaggregation
170-
# model$specs$alias <- "milkbar"
170+
# model$specs$Alias <- "milkbar"
171171
# model$specs$DisaggregationSpecs <- "UtilityDisaggregation"
172172
# model <- useeior:::loadIOData(model, file.path(cfg))
173173
# model <- useeior:::loadandbuildSatelliteTables(model)
@@ -176,16 +176,7 @@ testVisualizationFunctions(model)
176176
# model <- useeior:::constructEEIOMatrices(model)
177177
# printValidationResults(model)
178178

179-
# ## StateEEIOv1.0 Two-region Summary model with Utility disaggregation by Proxy
180-
# ## I.e., using employment values by detail-level industries to inform disaggregation
181-
# model <- useeior:::initializeModel(m, configpaths = file.path(cfg))
182-
# model$specs$Model <- "GAEEIOv1.0-75-Proxy-GHG-19"
183-
# model$specs$IODataVersion <- "0.3.0" # required for disaggregation
184-
# model$specs$DisaggregationSpecs <- "UtilityDisaggByProxy"
185-
# model <- useeior:::loadIOData(model, file.path(cfg))
186-
# model <- useeior:::loadandbuildSatelliteTables(model)
187-
# model <- useeior:::loadandbuildIndicators(model)
188-
# model <- useeior:::loadDemandVectors(model)
189-
# model <- useeior:::constructEEIOMatrices(model)
190-
# printValidationResults(model)
191-
179+
## StateEEIOv1.3 Two-region Summary model, 2017 schema
180+
m <- "GAEEIOv1.3-pecan-22"
181+
model <- buildModel(m)
182+
printValidationResults(model)

0 commit comments

Comments
 (0)