RMI-PACTA / pacta.portfolio.report

pacta.portfolio.report
https://rmi-pacta.github.io/pacta.portfolio.report/
MIT License
1 stars 0 forks source link

need to add legend ordering for new scenarios in 2022Q4 and 2023Q4 data #53

Closed cjyetman closed 5 months ago

cjyetman commented 5 months ago

2022Q4 and 2023Q4 datasets include new scenarios that have not previously been included

https://github.com/RMI-PACTA/workflow.data.preparation/blob/680eda103914219b756e9630315378ae83dbd4f8/config.yml#L131

  scenario_raw_data_to_include: ["geco_2022", "isf_2021", "weo_2022"]

https://github.com/RMI-PACTA/workflow.data.preparation/blob/680eda103914219b756e9630315378ae83dbd4f8/config.yml#L171

scenario_raw_data_to_include: ["geco_2023", "isf_2023", "weo_2023"]
# 2022Q4
unique(pacta.scenario.preparation::geco_2022$scenario)
#> [1] "1.5C"      "NDC_LTS"   "Reference"
unique(pacta.scenario.preparation::isf_2021$scenario)
#> [1] "NZE"
unique(pacta.scenario.preparation::weo_2022$scenario)
#> [1] "APS"      "NZE_2050" "STEPS"

# 2023Q4
unique(pacta.scenario.preparation::geco_2023$scenario)
#> [1] "1.5C"      "NDC-LTS"   "Reference"
unique(pacta.scenario.preparation::isf_2023$scenario)
#> [1] "1.5°C"
unique(pacta.scenario.preparation::weo_2023$scenario)
#> [1] "STEPS"    "APS"      "NZE_2050"

therefore we will need to include these new scenarios in the legend ordering for the trajectory volume plot... https://github.com/RMI-PACTA/pacta.portfolio.report/blob/24ebb45079153fb62d6080572830b02afb0fdfc2/inst/js/trajectory_alignment.js#L381-L399

ℹ️ FYI @MonikaFu @AlexAxthelm @jdhoffa

cjyetman commented 5 months ago

💡 TIP: you can encode the ° (degrees symbol) with either a hex or unicode escape sequence to get around R CMD check complaining about non-ASCII code being used

pacta.portfolio.import:::char_to_hex("°")
#> "\xc2\xb0"
pacta.portfolio.import:::char_to_unicode("°")
#> "\U000000B0"

e.g.

"1.5°C"
#> [1] "1.5°C"
"1.5\xc2\xb0C"
#> [1] "1.5°C"
"1.5\U000000B0C"
#> [1] "1.5°C"
jdhoffa commented 5 months ago

Relates to #52