-
Notifications
You must be signed in to change notification settings - Fork 31
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
read in IEA Energy Efficiency Indicators database #111
Conversation
Sorry for bringing up the source name again. But I was wondering, if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much, Falk! Looks good. Please just consider my proposal for the dimension names and the source name. If you are indifferent about the latter, let's please change it to IEA_EEI
.
for (domain in c("INDUSTRY", "TRANSPORT", "RESIDENTIAL", "SERVICES")) { | ||
data <- rbind(data, fread( | ||
file = file.path("2023", paste0("IEA - EEI ", domain, ".TXT")), | ||
col.names = c("CARBON_INDICATOR", "END_USE", "TIME", "COUNTRY", "VALUE"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
col.names = c("CARBON_INDICATOR", "END_USE", "TIME", "COUNTRY", "VALUE"), | |
col.names = c("ITEM", "ENDUSE", "TIME", "COUNTRY", "VALUE"), |
I suggest different dimension names. This is tricky, as IEA mixes very different types of data:
col.names[1]
: Indicators, Activity, Products --> ITEMcol.names[2]
: End use, blank for activity --> ENDUSE
#' @importFrom data.table fread := | ||
#' @importFrom dplyr %>% filter mutate distinct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#' @importFrom data.table fread := | |
#' @importFrom dplyr %>% filter mutate distinct | |
#' @importFrom data.table fread | |
#' @importFrom dplyr %>% filter mutate distinct | |
#' @importFrom magclass as.magpie |
#' | ||
#' @author Falk Benke | ||
#' @param x MAgPIE object to be converted | ||
#' @importFrom madrat toolCountry2isocode toolCountryFill |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#' @importFrom madrat toolCountry2isocode toolCountryFill | |
#' @importFrom madrat toolCountry2isocode toolCountryFill | |
#' @importFrom magclass getItems getItems<- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick implementation!
No description provided.