From 2d7dd7f5a476195808e9670b036ba944c5e2719c Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Tue, 20 Dec 2016 22:12:28 +0100 Subject: [PATCH] First two graphs implemented --- ISO27001effectiveness/R/graphs.R | 13 +++++++++++++ 1 file changed, 13 insertions(+), 0 deletions(-) create mode 100644 ISO27001effectiveness/R/graphs.R diff --git a/ISO27001effectiveness/R/graphs.R b/ISO27001effectiveness/R/graphs.R new file mode 100644 index 0000000..68c5d12 --- /dev/null +++ b/ISO27001effectiveness/R/graphs.R @@ -0,0 +1,13 @@ +#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),]) -- libgit2 0.22.2