Skip to content

Commit

Permalink
converge CHA cement parameters until 2100 not 2200 to tamper future p…
Browse files Browse the repository at this point in the history
…roduction
  • Loading branch information
0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q committed Dec 18, 2022
1 parent 4737c5a commit 9dcf5a8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions R/EDGE-Industry.R
Original file line number Diff line number Diff line change
Expand Up @@ -1858,13 +1858,18 @@ calcIndustry_Value_Added <- function(subtype = 'physical',
regression_parameters_cement_production_converging <-
regression_parameters_cement_production %>%
filter('World' != .data$region) %>%
mutate(year = as.integer(2000)) %>%
complete(nesting(!!!syms(c('region', 'a', 'b'))), year = 2000:2100) %>%
mutate(year = 2000L,
target_year = case_when(
'CHA' == .data$region ~ 2100L,
TRUE ~ 2200L)) %>%
complete(nesting(!!!syms(c('region', 'a', 'b', 'target_year'))),
year = 2000:2100) %>%
mutate(a = .data$a
+ ( (param_a - .data$a)
/ (2200 - 2000)
/ (.data$target_year - 2000)
* (.data$year - 2000)
))
)) %>%
select(-'target_year')

projected_cement_data <- inner_join(
regression_parameters_cement_production_converging,
Expand Down

0 comments on commit 9dcf5a8

Please sign in to comment.