graphs.R 873 Bytes
#2014
qplot(x = country_short, y = X2014, data = Cert_PerCountry[Cert_PerCountry$X2014 > mean(Cert_PerCountry$X2014),])
attacks2k14 <- Attacks[Attacks$Date < "2015-01-01" & Attacks$Date >= "2014-01-01",]
frameAttacks2k14 <- as.data.frame(table(attacks2k14$Country))
colnames(frameAttacks2k14) <- c("Country","Attacks")
qplot(x = Country, y = Attacks, data = frameAttacks2k14[frameAttacks2k14$Attacks > mean(frameAttacks2k14$Attacks),])

#2015
qplot(x = country_short, y = X2015, data = Cert_PerCountry[Cert_PerCountry$X2015 > mean(Cert_PerCountry$X2015),])
attacks2k15 <- Attacks[Attacks$Date < "2016-01-01" & Attacks$Date >= "2015-01-01",]
frameAttacks2k15 <- as.data.frame(table(attacks2k15$Country))
colnames(frameAttacks2k15) <- c("Country","Attacks")
qplot(x = Country, y = Attacks, data = frameAttacks2k15[frameAttacks2k15$Attacks > mean(frameAttacks2k15$Attacks),])