SORCE: EDGAR http://edgar.jrc.ec.europa.eu/overview.php?v=CO2andGHG1970-2016&dst=GHGemi, it excludes landuse emissions.
library(ggplot2)
library(data.table)
library("ggpubr")
## Loading required package: magrittr
#chose contries to plot
cc=c('World','United States of America (the)','United Kingdom of Great Britain and Northern Ireland (the)','Portugal','France','Germany','France',
'Japan','Canada','Brazil','Mexico','Indonesia','China','India','Italia','EU28','Russian Federation (the)','Australia','Korea (the Republic of)',
'South Africa')
##################CO2##################
#read co2 EDGAR files
co2cap=fread("EDGARv432_FT2016_CO2_per_capita_emissions_1970-2016.csv",header=TRUE)
co2cap$redpcent = -(co2cap$`2016`-co2cap$`2015`)/co2cap$`2015`
co2cap$group='o'
co2cap[redpcent>0,]$group='Reduction'
co2cap[redpcent<0,]$group='Increase'
#read co2 EDGAR files
co2gdp=fread("EDGARv432_FT2016_CO2_per_GDP_emissions_1970-2016.csv",header=TRUE)
co2gdp$redpcent = -(co2gdp$`2016`-co2gdp$`2015`)/co2gdp$`2015`
co2gdp$group='o'
co2gdp[redpcent>0,]$group='Reduction'
co2gdp[redpcent<0,]$group='Increase'
#read co2 EDGAR files
co2=fread("EDGARv432_FT2016_CO2_total_emissions_1970-2016.csv",header=TRUE)
co2$redpcent = -(co2$`2016`-co2$`2015`)/co2$`2015`
co2$group='o'
co2[redpcent>0,]$group='Reduction'
co2[redpcent<0,]$group='Increase'
co2tot=co2
co2tot=co2tot[,list(`2016`=sum(`2016`),`2015`=sum(`2015`)),by=c('ISO_NAME')]
co2tot$redpcent = -(co2tot$`2016`-co2tot$`2015`)/co2tot$`2015`
co2tot$group='o'
co2tot[redpcent>0,]$group='Reduction'
co2tot[redpcent<0,]$group='Increase'