Skip to content

Commit

Permalink
add NoReported in CO2 markets
Browse files Browse the repository at this point in the history
  • Loading branch information
klau506 committed Oct 21, 2024
1 parent 6bbec0f commit d23f901
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1976,6 +1976,7 @@ get_co2_price_fragmented_tmp <- function(GCAM_version = "v7.0") {
co2_price_fragmented <-
co2_price_fragmented_pre %>%
left_join_strict(CO2_market_filteredReg, by = c("market"), mapping = paste('co2_market',GCAM_version,sep='_'), multiple = "all") %>%
dplyr::filter(region != 'NoReported') %>%
dplyr::filter(stats::complete.cases(.)) %>%
dplyr::mutate(value = value /
get(paste('convert',GCAM_version,sep='_'), envir = asNamespace("gcamreport"))[['conv_C_CO2']] *
Expand Down Expand Up @@ -2210,6 +2211,7 @@ get_energy_price_fragmented <- function(GCAM_version = "v7.0") {
dplyr::left_join(rgcam::getQuery(prj, "CO2 prices") %>% # left_join already checked
dplyr::filter(!grepl("LUC", market)) %>%
dplyr::left_join(CO2_market_filteredReg, by = c("market"), relationship = "many-to-many") %>%
dplyr::filter(region != 'NoReported') %>% %>%
dplyr::select(scenario, region, year, price_C = value), by = c("scenario", "region", "year"),
relationship = "many-to-many") %>%
tidyr::replace_na(list(price_C = 0)) %>%
Expand Down

0 comments on commit d23f901

Please sign in to comment.