Air pollution emissions in Helsinki: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(→‎Calculations: caremissions)
No edit summary
Line 28: Line 28:


gp
gp
objects.latest("Op_en7923", code_name="caremission") # [[Air pollution emissions in Helsinki]]
caremission <- EvalOutput(caremission)
gpcar <- ggplot(caremission@output, aes(x=Year, weight=caremissionResult, fill=Vehicle))+geom_bar()+
  facet_grid(Pollutant~Municipality, scales="free_y")+
  theme_gray(base_size=20)+
  labs(y="CO2eq emissions (kton/a)")
gpcar


if(FALSE) {
if(FALSE) {
Line 33: Line 44:


emissionsplotly <- ggplotly(gp)
emissionsplotly <- ggplotly(gp)
caremissionsplotly <- ggplotly(gpcar)


objects.store(emissionsplotly)
objects.store(emissionsplotly, caremissionsplotly)
cat("Plotly graph emissionsplotly stored.\n")
cat("Plotly graphs emissionsplotly, caremissionsplotly stored.\n")
</rcode>
</rcode>


Line 127: Line 139:
</rcode>
</rcode>


<rcode name="caremission" label="Initiate ovariable caremission (for developers only)" embed=1>
<rcode name="caremission" label="Initiate ovariable caremission (for developers only)" embed=1 graphics=1>
# This is code Op_en7923/caremission on page [[Air pollution emissions in Helsinki]]
# This is code Op_en7923/caremission on page [[Air pollution emissions in Helsinki]]
library(OpasnetUtils)
library(OpasnetUtils)
library(ggplot2)


caremission <- Ovariable(
caremission <- Ovariable(
   "caremission",
   "caremission",
   dependencies = data.frame(
   dependencies = data.frame(
     Name=c("carkm","emfactor"),
     Name=c("carkm","caremf"),
     Ident=c(
     Ident=c(
       "Op_en7926/carkm", # [[Road traffic in Helsinki]]
       "Op_en7926/carkm", # [[Road traffic in Helsinki]]
       "Op_en2989/emfactor" # [[Emission factors for road transport]]
       "Op_en2989/caremf" # [[Emission factors for road transport]]
     )
     )
   ),
   ),
   formula = function(...) {
   formula = function(...) {
     out <- carkm * emfactor
     out <- carkm * caremf / 1000 # Mkm * g/km --> kton
     return(out)
     return(out)
   }
   }
)
)
caremission@meta$unit <- "kton/a"
ggplot(EvalOutput(caremission)@output, aes(x=Year, weight=caremissionResult, fill=Vehicle))+
  geom_bar()+facet_wrap(~Pollutant, scales="free_y")


objects.store(caremission)
objects.store(caremission)

Revision as of 09:45, 11 December 2018



Air pollution emissions in Helsinki estimate direct air pollution emissions (including CO2eq) from the Helsinki area.

Question

What are the amounts of air pollution (notably CO2eq and PM2.5) emitted from the Helsinki area (Helsinki specifically but also other municipalities of the Helsinki Metropolitan Area)?

Answer

+ Show code

Rationale

Dependencies

Calculations

The answer metadata can be obtained by using link: http://cl1.opasnet.org/opasnet_base_2/index.php?ident=op_en7923.answer&act=0

The actual data: (key is unique to every download instance and is generated when the above link is opened) - http://cl1.opasnet.org/opasnet_base_2/index.php?key=8dYqLbtppz4HM7sYaAyj4t6S49jQNRWJ

+ Show code

+ Show code

+ Show code

+ Show code

See also

Keywords

References