Skip to content

Commit

Permalink
more changes for HCL reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Sampedro committed Mar 20, 2024
1 parent f9afb2c commit a4f7a93
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 6 deletions.
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export(m2_get_conc_pm25)
export(m3_get_daly_o3)
export(m3_get_daly_pm25)
export(m3_get_mort_o3)
export(m3_get_mort_o3_ecoloss)
export(m3_get_mort_pm25)
export(m3_get_o3_ecoloss_hcl)
export(m3_get_o3_ecoloss_vsl)
export(m3_get_pm25_ecoloss_hcl)
export(m3_get_pm25_ecoloss_vsl)
export(m3_get_yll_o3)
export(m3_get_yll_pm25)
Expand Down
4 changes: 2 additions & 2 deletions R/m3b_health_ecoloss.R
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ m3_get_pm25_ecoloss_hcl<-function(db_path = NULL, query_path = "./inst/extdata",
gcamdata::left_join_error_no_match(gdp_growth, by=c("region", "year")) %>%
gcamdata::left_join_error_no_match(gdp_pc, by=c("region", "year")) %>%
dplyr::mutate(elast = inc_elas_vsl) %>%
dplyr::mutate(damages = gdp_pc * gcamdata::gdp_deflator(2015, 2005) * ((1 + growth) / (1 + elast)) * mort_pm25 / 1E6,
dplyr::mutate(damages = gdp_pc * gcamdata::gdp_deflator(2015, 2005) * ((growth) / (1 + elast)) * mort_pm25 / 1E6,
unit = "Million$2015") %>%
dplyr::select(region, year, damages, unit)

Expand Down Expand Up @@ -534,7 +534,7 @@ m3_get_o3_ecoloss_hcl<-function(db_path = NULL, query_path = "./inst/extdata", d
gcamdata::left_join_error_no_match(gdp_growth, by=c("region", "year")) %>%
gcamdata::left_join_error_no_match(gdp_pc, by=c("region", "year")) %>%
dplyr::mutate(elast = inc_elas_vsl) %>%
dplyr::mutate(damages = gdp_pc * gcamdata::gdp_deflator(2015, 2005) * ((1 + growth) / (1 + elast)) * mort_o3 / 1E6,
dplyr::mutate(damages = gdp_pc * gcamdata::gdp_deflator(2015, 2005) * ((growth) / (1 + elast)) * mort_o3 / 1E6,
unit = "Million$2015") %>%
dplyr::select(region, year, damages, unit)

Expand Down
72 changes: 72 additions & 0 deletions man/m3_get_o3_ecoloss_hcl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions man/m3_get_pm25_ecoloss_hcl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a4f7a93

Please sign in to comment.