Skip to content

Commit

Permalink
fix selected_pollutants
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Sampedro committed Mar 19, 2024
1 parent 7741818 commit 2de2bcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/m1_emissions_rescale.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ m1_emissions_rescale<-function(db_path = NULL, query_path = "./inst/extdata", db
prj_rd$`nonCO2 emissions by sector (excluding resource production)` %>%
dplyr::filter(scenario %in% scen_name)) %>%
dplyr::arrange(ghg) %>%
dplyr::filter(ghg %in% unique(levels(as.factor(selected_pollutants)))) %>%
dplyr::filter(ghg %in% unique(levels(as.factor(rfasst::selected_pollutants)))) %>%
tibble::as_tibble() %>%
gcamdata::left_join_error_no_match(my_pol %>%
dplyr::rename(ghg = Pollutant) %>%
Expand All @@ -118,7 +118,7 @@ m1_emissions_rescale<-function(db_path = NULL, query_path = "./inst/extdata", db
prj_rd$`nonCO2 emissions by resource production` %>%
dplyr::filter(scenario %in% scen_name)) %>%
dplyr::arrange(ghg) %>%
dplyr::filter(ghg %in% unique(levels(as.factor(selected_pollutants)))) %>%
dplyr::filter(ghg %in% unique(levels(as.factor(rfasst::selected_pollutants)))) %>%
gcamdata::left_join_error_no_match(my_pol %>% dplyr::rename(ghg = Pollutant), by = dplyr::join_by(ghg)) %>%
dplyr::mutate(ghg = dplyr::if_else(grepl("SO2", ghg), "SO2", ghg)) %>%
dplyr::select(-ghg) %>%
Expand Down

0 comments on commit 2de2bcb

Please sign in to comment.