Skip to content

Commit

Permalink
fix assignment of locations for satellite tables already using acroyn…
Browse files Browse the repository at this point in the history
…yms (i.e., Value Add)
  • Loading branch information
bl-young committed Aug 15, 2023
1 parent 3b0edf4 commit 921353a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/LoadSatellites.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ conformTbStoIOSchema <- function(tbs, sat_spec, model) {
tbs <- disaggregateSatelliteTable(disagg, tbs, sat_spec)
}
}
# Change Location if model is a state model
if (all(model$specs$ModelRegionAcronyms!="US", model$specs$IODataSource=="stateior")) {
# Change Location if model is a state model and not already using acronyms
if (all(model$specs$ModelRegionAcronyms!="US", model$specs$IODataSource=="stateior",
all(!unique(tbs$Location) %in% model$specs$ModelRegionAcronyms))) {
# Format location in tbs
tbs$Location <- formatLocationforStateModels(tbs$Location)
}
Expand Down

0 comments on commit 921353a

Please sign in to comment.