Skip to content

Commit

Permalink
convert unit
Browse files Browse the repository at this point in the history
  • Loading branch information
fbenke-pik committed Oct 16, 2023
1 parent 4fb3421 commit 0afb4f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion R/convertGlobalEnergyMonitor.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ convertGlobalEnergyMonitor <- function(x) {
"The Gambia" = "GMB",
"Virgin Islands (U_S_)" = "VIR"
)
getItems(x, dim = 1) <- toolCountry2isocode(getItems(x, dim = 1), mapping = mapping)
getItems(x, dim = 1) <- toolCountry2isocode(getItems(x, dim = 1),
mapping = mapping, warn = FALSE)
return(toolCountryFill(x, no_remove_warning = "KOS"))
}
5 changes: 3 additions & 2 deletions R/readGlobalEnergyMonitor.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ readGlobalEnergyMonitor <- function() {
mutate(
!!sym("scenario") := "historical",
!!sym("model") := "Global Energy Outlook",
!!sym("unit") := "MW",
!!sym("variable") := nb$variable
!!sym("unit") := "GW",
!!sym("variable") := nb$variable,
!!sym("value") := !!sym("value") / 1000
) %>%
select("model", "scenario", "region", "period", "variable", "unit", "value")

Expand Down

0 comments on commit 0afb4f2

Please sign in to comment.