Skip to content

Commit

Permalink
NDC update 2024-08-31
Browse files Browse the repository at this point in the history
  • Loading branch information
orichters committed Sep 9, 2024
1 parent a388dd1 commit 9e154d7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion R/calcCapTarget.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ calcCapTarget <- function(sources) {
"2022_cond" = readSource("UNFCCC_NDC", subtype = "Capacity_2022_cond"),
"2022_uncond" = readSource("UNFCCC_NDC", subtype = "Capacity_2022_uncond"),
"2023_cond" = readSource("UNFCCC_NDC", subtype = "Capacity_2023_cond"),
"2023_uncond" = readSource("UNFCCC_NDC", subtype = "Capacity_2023_uncond")
"2023_uncond" = readSource("UNFCCC_NDC", subtype = "Capacity_2023_uncond"),
"2024_cond" = readSource("UNFCCC_NDC", subtype = "Capacity_2024_cond"),
"2024_uncond" = readSource("UNFCCC_NDC", subtype = "Capacity_2024_uncond"),
)

listYears <- lapply(listCapacitiesNDC, getItems, dim = "year") %>% unlist() %>% unique() %>% sort()
Expand Down
4 changes: 3 additions & 1 deletion R/calcEmiTarget.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ calcEmiTarget <- function(sources, subtype) {
"2022_cond" = readSource("UNFCCC_NDC", subtype = "Emissions_2022_cond"),
"2022_uncond" = readSource("UNFCCC_NDC", subtype = "Emissions_2022_uncond"),
"2023_cond" = readSource("UNFCCC_NDC", subtype = "Emissions_2023_cond"),
"2023_uncond" = readSource("UNFCCC_NDC", subtype = "Emissions_2023_uncond")
"2023_uncond" = readSource("UNFCCC_NDC", subtype = "Emissions_2023_uncond"),
"2024_cond" = readSource("UNFCCC_NDC", subtype = "Emissions_2024_cond"),
"2024_uncond" = readSource("UNFCCC_NDC", subtype = "Emissions_2024_uncond")
)

listYears <- lapply(listGhgfactors, getItems, dim = "year") %>% unlist() %>% unique() %>% sort()
Expand Down
6 changes: 4 additions & 2 deletions R/readUNFCCC_NDC.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ readUNFCCC_NDC <- function(subtype) {
NDCfile <- "NDC_2021.xlsx"
} else if (grepl("2022", subtype, fixed = TRUE)) {
NDCfile <- "NDC_2022-12-31.xlsx"
} else {
} else if (grepl("2023", subtype, fixed = TRUE)) {
NDCfile <- "NDC_2023-11-29.xlsx"
if (!grepl("2023", subtype, fixed = TRUE)) {
} else {
NDCfile <- "NDC_2024-08-31.xlsx"
if (!grepl("2024", subtype, fixed = TRUE)) {
warning("\nNo data for year in ", subtype, " available. Choose default: ", NDCfile)
}
}
Expand Down

0 comments on commit 9e154d7

Please sign in to comment.