10/25/2018

Overview

The goal is to create a simple shiny application to allow a user to examine changes in crop value/output in Ireland over time. Data on agricultural output is obtained from Ireland’s Central Statistics Office and filtered for crop data only.

The app allows the user to plot individual lines from the plot on slide 5 i.e. select a crop of interest.

Data set

url <- "http://www.cso.ie/px/pxeirestat/Database/Eirestat/Regional%20Accounts/ACA03.px"
ACA03df <- as.data.frame(read.px(url))
head(levels(ACA03df$Statistic)) #dataset contains 40 measures of agri output
## [1] "All Livestock (Euro Million)" "Cattle (Euro Million)"       
## [3] "Pigs (Euro Million)"          "Sheep (Euro Million)"        
## [5] "Horses (Euro Million)"        "Poultry (Euro Million)"
levels(ACA03df$Year) #over the period 2010-2017
## [1] "2010" "2011" "2012" "2013" "2014" "2015" "2016" "2017"
Crops <- ACA03df %>% 
    filter(Statistic %in% levels(ACA03df$Statistic)[10:16]) %>% #restrict to data about crops
    filter(Region == "State") #ignore regional data

Information on how the app works

Plot

This plot obscures the growth in the value of fresh fruit and vegetable crops in recent years because these crops are still dwarved by forage.