Comparison of Irish vs EU Average Prices based on Eurostat/CSO data.
and here's the R code
rm(list=ls()) # Remove ALL objects before starting library(ggplot2) library(ggalt) # devtools::install_github("hrbrmstr/ggalt") library(readr) # Data Source: http://www.cso.ie/en/releasesandpublications/er/cpl/comparativepricelevelsforfoodbeveragesandtobacco2015/ DF1 = read_csv("Group,IE_Average, EU_Average Bread and cereals,.11,0 Meat,.06,.00 Fish,.08,.00 Milk cheese and eggs,.28,.00 Oils and fats,.13,.00 Fruits vegetables and potatoes,.36,.00 Alcoholic Beverages, .75, .00 Non-Alcoholic Beverages, .27, .00 Tobacco, .89, 0") gg = ggplot(DF1, aes(x=IE_Average, xend=EU_Average, y=Group, group=Group)) gg = gg + geom_dumbbell(color="#003399", size=0.75, point.colour.l="green") gg = gg + scale_x_continuous(label=percent) gg = gg + labs(x=NULL, y=NULL) gg = gg + theme_bw() gg = gg + theme(plot.background=element_rect(fill="#f7f7f7")) gg = gg + theme(panel.background=element_rect(fill="#f7f7f7")) gg = gg + theme(panel.grid.minor=element_blank()) gg = gg + theme(panel.grid.major.y=element_blank()) gg = gg + theme(panel.grid.major.x=element_line()) gg = gg + theme(axis.ticks=element_blank()) gg = gg + labs(x="Percentage by which Irish prices are higher than EU average.", y=NULL, title="IRISH vs EU AVERAGE PRICES.", caption="Data source: www.cso.ie http://goo.gl/g04crh, 22/June/2016") gg = gg + theme(legend.position="top") gg = gg + theme(panel.border=element_blank()) gg = gg + geom_text(data=DF1, aes(x=IE_Average, y=Group, label=(IE_Average*100)), color="black", size=2.75, vjust=-.7, family="Calibri") gg













