We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
target_sda
NA
There are two big issues exposed in the reprex below.
co2_scenario
target_NA
Brief description of the problem
library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union library(r2dii.data) library(r2dii.match) library(r2dii.analysis) # ald with only sectors that we have CO2 scenarios for ald <- head(ald_demo, 100) %>% filter(sector %in% c("cement", "steel")) matched<- prioritize(match_name(loanbook_demo, ald)) co2_scenario <- co2_intensity_scenario_demo out <- target_sda(matched, ald, co2_scenario) out_targets <- out %>% filter(!(emission_factor_metric %in% c("projected", "corporate_economy"))) # all targets before 2020 are NA out_targets %>% filter(year < 2020) #> # A tibble: 14 x 4 #> sector year emission_factor_metric emission_factor_value #> <chr> <dbl> <chr> <dbl> #> 1 cement 2013 target_NA NA #> 2 cement 2013 target_demo NA #> 3 cement 2014 target_NA NA #> 4 cement 2014 target_demo NA #> 5 cement 2015 target_NA NA #> 6 cement 2015 target_demo NA #> 7 cement 2016 target_NA NA #> 8 cement 2016 target_demo NA #> 9 cement 2017 target_NA NA #> 10 cement 2017 target_demo NA #> 11 cement 2018 target_NA NA #> 12 cement 2018 target_demo NA #> 13 cement 2019 target_NA NA #> 14 cement 2019 target_demo NA # some targets after 2020 are NA out_targets %>% filter(year >= 2020) #> # A tibble: 93 x 4 #> sector year emission_factor_metric emission_factor_value #> <chr> <dbl> <chr> <dbl> #> 1 cement 2020 target_NA NA #> 2 cement 2020 target_demo 0.723 #> 3 cement 2021 target_NA NA #> 4 cement 2021 target_demo 0.660 #> 5 cement 2022 target_NA NA #> 6 cement 2022 target_demo 0.597 #> 7 cement 2023 target_NA NA #> 8 cement 2023 target_demo 0.534 #> 9 cement 2024 target_NA NA #> 10 cement 2024 target_demo 0.471 #> # … with 83 more rows
Created on 2021-06-08 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered:
years
scenario
Successfully merging a pull request may close this issue.
There are two big issues exposed in the reprex below.
target_sda
should only output values in the range of years presented in theco2_scenario
input.target_sda
should not output a value fortarget_NA
(which seems to be a scenario defined as NA?)Brief description of the problem
Created on 2021-06-08 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: