Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates to support two region disaggregation #328

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

bl-young
Copy link
Collaborator

Aligns with USEPA/stateior#46

Revises handling of two region data acquisition to incorporate alias instead of disaggregation name. Incorporates necessary input files to support two region disaggregations.

Resolves #290

@@ -12,14 +12,15 @@
#' @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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is an alias now part of a model specification file or was it added as a part of specs after reading in the spec file in and parsing it out of the model name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes as I was thinking about this, I think we have to have the alias as its own (optional) field in the model specs. We can't use the text parsing because older models don't fit the schema (and so grabbing the second to last substring between - or something would grab GHG for instance).

In Stateior, as a means to differentiate model build files, we are tagging them with the alias when they are built, e.g. TwoRegion_Summary_Use_{alias}.rds or whatever.

But I need to add to the model specs format specs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants