This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.net.httpserver.* | |
Object.metaClass.webapp = { | |
{ path -> | |
try { | |
def attrs = path.split('/')[1..-1] | |
[200, owner.delegate.invokeMethod(attrs.head(), attrs.tail() as Object[]) as String] | |
} catch (Exception e) { | |
[500, e as String] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("jpeg", "reshape2", "ggplot2") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Image URL: | |
allImageURLs <- c("http://media.charlesleifer.com/blog/photos/thumbnails/akira_940x700.jpg", | |
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/402px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg", | |
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Official_portrait_of_Barack_Obama.jpg/441px-Official_portrait_of_Barack_Obama.jpg", | |
"http://cache.boston.com/universal/site_graphics/blogs/bigpicture/obama_11_05/obama22_16604051.jpg", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
category | value | sector | |
---|---|---|---|
UK production emissions | 632 | UK | |
Carbon flows from EU | 88 | EU | |
Carbon flows to EU | -61 | EU | |
Carbon flows from other Annex 1 | 82 | Annex 1 | |
Carbon flows to other Annex 1 | -39 | Annex 1 | |
Carbon flows from non-Annex 1 | 104 | Other non-Annex 1 | |
Carbon flows from non-Annex 1 | 64 | China | |
Carbon flows to non-Annex 1 | -25 | Non-Annex 1 | |
UK consumption emissions | 845 | UK |