Air pollution emissions in Helsinki: Difference between revisions
Jump to navigation
Jump to search
(→Answer) |
(→Answer: POST with plotly json works!) |
||
Line 12: | Line 12: | ||
== Answer == | == Answer == | ||
<rcode name="answer" graphics=1 embed= | * Model run 12.12.2018 [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=tYDyrFr6SqKZlwoK] | ||
<rcode name="answer" graphics=1 embed=0> | |||
# This is code Op_en7923/answer on page [[Air pollution emissions in Helsinki]] | # This is code Op_en7923/answer on page [[Air pollution emissions in Helsinki]] | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
library(ggplot2) | library(ggplot2) | ||
library(plotly) | library(plotly) | ||
library(httr) | |||
library(jsonlite) | |||
objects.latest("Op_en7923", code_name="emission") # [[Air pollution emissions in Helsinki]] emission | objects.latest("Op_en7923", code_name="emission") # [[Air pollution emissions in Helsinki]] emission | ||
Line 41: | Line 45: | ||
if(FALSE) { | if(FALSE) { | ||
# https://plot.ly/ggplot2/user-guide/#interactively-view-the-json-object | |||
tst <- ggplot(data.frame(A=c("a","b","c"),B=1:3), aes(x=A, weight=B, fill=A))+geom_bar() | |||
POST( | |||
"http://httpbin.org/anything", | |||
body = plotly_json(tst), | |||
encode = "json" | |||
) | |||
POST( | |||
"https://httpbin.org/post", | |||
body = list(x = "A simple text string"), | |||
encode = "json" | |||
) | |||
emissionsplotly <- ggplotly(gp) | emissionsplotly <- ggplotly(gp) |
Revision as of 18:19, 12 December 2018
Moderator:Nobody (see all) Click here to sign up. |
This page is a stub. You may improve it into a full page. |
Upload data
|
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
- Model run 12.12.2018 [1]
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