RMI-PACTA / pacta.portfolio.report

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

use subscript 2 in "CO₂" in emissions plot y-axis label #69

Closed cjyetman closed 3 months ago

cjyetman commented 4 months ago

Not sure how to achieve this in this context, but it would be preferable to show "CO₂" instead of "CO2" https://github.com/RMI-PACTA/pacta.portfolio.report/blob/de3e1f8ecfc609eb4055fad77a5906abbe196df7/R/prep_emissions_trajectory.R#L12-L21

cjyetman commented 3 months ago

"CO₂" can be written in ASCII in R by using a unicode escape

"CO\U00002082"
#> [1] "CO₂"

so this could be written as...

 emissions_units <- 
   c( 
     Automotive = "tons of CO\U00002082 per km per cars produced", 
     Aviation = "tons of CO\U00002082 per passenger km per active planes", 
     Cement = "tons of CO\U00002082 per tons of cement", 
     Coal = "tons of CO\U00002082 per tons of coal", 
     `Oil&Gas` = "tons of CO\U00002082 per GJ", 
     Power = "tons of CO\U00002082 per MWh", 
     Steel = "tons of CO\U00002082 per tons of steel" 
   )