Load a dataset containing GFPM scenarios
library(plyr)
library(xtable)
library(ggplot2)
load("enddata/GFPM_Output_TTIP_with_sensitivity.RDATA")
Plot scenarios changes
product = "Sawnwood"
element = "Demand"
aggregates = subset(allScenarios$aggregates, Scenario != "LowTTIP")
dtf = subset(aggregates, Product == product)
p = ggplot(data = subset(dtf, Element == element)) + aes(x = Period, y = Volume,
colour = GFPM_REG, linetype = Scenario) + geom_line() + # geom_point(aes(shape=Scenario)) + geom_point(data = subset(dtf,Element ==
# element&Scenario=='HighTTIP'), shape=15, size=4) +
geom_point(data = subset(dtf, Element == element & Scenario == "HighTTIP"),
aes(shape = Scenario), size = 4) + ggtitle(paste(product, element)) + theme(legend.position = "bottom")
print(p)
Felbermayr 2013 reports a simulation of US and Germany's export values by 2025 for 3 forest related sectors: "forestry", "wood products" and "paper".
What are the export products?
unique(allScenarios$entity$Product[allScenarios$entity$Element == "Export"])
## [1] "Fuelwood" "IndRound" "Sawnwood" "Plywood" "ParticleB"
## [6] "FiberB" "MechPlp" "ChemPlp" "OthFbrPlp" "WastePaper"
## [11] "Newsprint" "PWPaper" "OthPaper"
We will aggregate the products as such: Forestry : IndRound, Wood Products : "Fuelwood" "Sawnwood" "Plywood" "ParticleB" "FiberB" * Paper Products : "MechPlp" "ChemPlp" "OthFbrPlp" "WastePaper" "Newsprint" "PWPaper" "OthPaper"
US and Germany's exports in forest products in 2025 (period 4 in our simulation). We are looking at percentage changes in volume between the base and the high scenarios.
USDEexp = subset(allScenarios$entity, Country %in% c("United States of America",
"Germany") & Element == "Export" & Period == 4 & Scenario %in% c("Base",
"High"), select = c(Scenario, Period, Product, Country, Volume))
USDEexp = reshape(USDEexp, idvar = c("Period", "Product", "Country"), timevar = "Scenario",
times = c("Base", "High"), direction = "wide")
USDEexp = transform(USDEexp, expchange = round((Volume.High - Volume.Base)/Volume.Base *
100, 2))
## Error: object 'Volume.High' not found
USDEexp = reshape(subset(USDEexp, select = -c(Volume.Base, Volume.High)), idvar = c("Period",
"Product"), timevar = "Country", direction = "wide")
## Error: object 'Volume.High' not found
names(USDEexp) = c("Period", "Product", "US exports %", "Germany exports %")
print(xtable(USDEexp, caption = "Percentage change in exports between the \n base and high scenarios on period 4 (2015)"),
type = "html", include.rownames = FALSE)
Percentage change in exports between the
base and high scenarios on period 4 (2015)
Period Product US exports % Germany exports %
4 Fuelwood United States of America 162.90
4 Fuelwood Germany 70.30
4 IndRound United States of America 22111.40
4 IndRound Germany 3833.60
4 Sawnwood United States of America 2022.30
4 Sawnwood Germany 14754.60
4 Plywood United States of America 278.20
4 Plywood Germany 187.00
4 ParticleB Germany 4423.60
4 ParticleB United States of America 169.10
4 FiberB United States of America 421.80
4 FiberB Germany 3903.40
4 MechPlp United States of America 317.40
4 MechPlp Germany 7.50
4 ChemPlp United States of America 9125.30
4 ChemPlp Germany 464.80
4 OthFbrPlp United States of America 173.10
4 OthFbrPlp Germany 87.40
4 WastePaper United States of America 32176.40
4 WastePaper Germany 1604.30
4 Newsprint United States of America 332.40
4 Newsprint Germany 377.40
4 PWPaper Germany 8430.70
4 PWPaper United States of America 1005.80
4 OthPaper United States of America 5471.30
4 OthPaper Germany 5925.70
USDEexp$ProductAgg[USDEexp$Product %in% c("Fuelwood", "Sawnwood", "Plywood",
"ParticleB", "FiberB")] = "Wood Products"
USDEexp$ProductAgg[USDEexp$Product == "IndRound"] = "Forestry"
# USDEexp$ProductAgg[USDEexp$Product %in% c('MechPlp', 'ChemPlp',
# 'OthFbrPlp', 'WastePaper', 'Newsprint', 'PWPaper', 'OthPaper') = 'Paper
# Products'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.