From 089207ada540adb4af7e6600d2f0951ee4a4ec91 Mon Sep 17 00:00:00 2001 From: Ben Young Date: Thu, 19 Dec 2024 13:04:50 -0500 Subject: [PATCH] add `Alias` to model specs --- R/StateiorFunctions.R | 2 +- format_specs/ModelSpecification.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/R/StateiorFunctions.R b/R/StateiorFunctions.R index f1ea6a67..5c8cb24e 100644 --- a/R/StateiorFunctions.R +++ b/R/StateiorFunctions.R @@ -12,7 +12,7 @@ #' @return A list of two-region IO data of model iolevel and year. getTwoRegionIOData <- function(model, dataname) { # Define state, year and iolevel - alias <- ifelse(!is.na(model$specs$alias), model$specs$alias, NULL) + alias <- ifelse(!is.na(model$specs$Alias), model$specs$Alias, NULL) if(!"US-DC" %in% model$specs$ModelRegionAcronyms) { state <- state.name[state.abb == gsub(".*-", "", model$specs$ModelRegionAcronyms[1])] } else { diff --git a/format_specs/ModelSpecification.md b/format_specs/ModelSpecification.md index ba3c4f03..ecce2f29 100644 --- a/format_specs/ModelSpecification.md +++ b/format_specs/ModelSpecification.md @@ -7,6 +7,7 @@ Model specifications are assigned in a yml file based on the parameters shown be | BaseIOSchema | int | Y | The base IO schema (e.g. 2012) | | BaseIOLevel | str | Y | The base IO level of detail (e.g. `Detail`) | | IOYear | int | Y | The base IO year | +| Alias | str | N | The alias provided to the model, typically also included in the model name. Required for two region models from stateior. | | ModelRegionAcronyms | list | Y | The model region acronyms | | ModelType | str | Y | The [model type](#Model-Types) (e.g. `EEIO`) | | IODataSource | str | Y | The model source (e.g. `BEA` or `stateior`) |