Commit 8beb9cc6cb01a22912ac5a41de121d60858bcc0b

Authored by Miguel Tuñón
0 parents

Descargados los primeros ficheros de datos (links en los correspondientes [Sourc…

…es.txt]) y añadidas las primeras funciones del parser para los archivos [ISO Survey]
Showing 37 changed files with 140 additions and 0 deletions
ISO27001effectiveness/.Rbuildignore 0 → 100644
  1 +++ a/ISO27001effectiveness/.Rbuildignore
  1 +^.*\.Rproj$
  2 +^\.Rproj\.user$
... ...
ISO27001effectiveness/DESCRIPTION 0 → 100644
  1 +++ a/ISO27001effectiveness/DESCRIPTION
  1 +Package: ISO27001effectiveness
  2 +Type: Package
  3 +Title: What the Package Does (Title Case)
  4 +Version: 0.1.0
  5 +Author: Who wrote it
  6 +Maintainer: The package maintainer <yourself@somewhere.net>
  7 +Description: More about what it does (maybe more than one line)
  8 + Use four spaces when indenting paragraphs within the Description.
  9 +License: What license is it under?
  10 +Encoding: UTF-8
  11 +LazyData: true
0 12 \ No newline at end of file
... ...
ISO27001effectiveness/ISO27001effectiveness.Rproj 0 → 100644
  1 +++ a/ISO27001effectiveness/ISO27001effectiveness.Rproj
  1 +Version: 1.0
  2 +
  3 +RestoreWorkspace: Default
  4 +SaveWorkspace: Default
  5 +AlwaysSaveHistory: Default
  6 +
  7 +EnableCodeIndexing: Yes
  8 +UseSpacesForTab: Yes
  9 +NumSpacesForTab: 2
  10 +Encoding: UTF-8
  11 +
  12 +RnwWeave: Sweave
  13 +LaTeX: pdfLaTeX
  14 +
  15 +AutoAppendNewline: Yes
  16 +StripTrailingWhitespace: Yes
  17 +
  18 +BuildType: Package
  19 +PackageUseDevtools: Yes
  20 +PackageInstallArgs: --no-multiarch --with-keep.source
... ...
ISO27001effectiveness/NAMESPACE 0 → 100644
  1 +++ a/ISO27001effectiveness/NAMESPACE
  1 +exportPattern("^[[:alpha:]]+")
... ...
ISO27001effectiveness/R/ISOSurvey_Parser.R 0 → 100644
  1 +++ a/ISO27001effectiveness/R/ISOSurvey_Parser.R
  1 +#------------------------------------------------------------------------------------------------------
  2 +#-----------------------------Parser Excel - ISO survey------------------------------------------------
  3 +#------------------------------------------------------------------------------------------------------
  4 +
  5 +
  6 +
  7 +#-----------------------------Library tests / install--------------------------------------------------
  8 +
  9 +
  10 +#' Install and load required libraries
  11 +#'
  12 +#' This function checks if every required library is installed to be loaded, if not they will be installed and then loaded.
  13 +#' Libraries installed:
  14 +#' xlsx to parse excel files like ISO survey source format
  15 +LoadParserLibraries <- function(){
  16 + if (!require("xlsx"))
  17 + {
  18 + install.packages("xlsx")
  19 + if (!require("xlsx")) stop("Error while loading package [xlsx]")
  20 + }
  21 +}
  22 +
  23 +#-----------------------------Read from file-----------------------------------------------------------
  24 +
  25 +#' Get data frame from an excel file
  26 +#'
  27 +#' Check if the file exists and then parse it into a data.frame
  28 +#' @param file path to excel file
  29 +#' @param sheet index of sheet to parse
  30 +#'
  31 +#' @return data.frame
  32 +ParseExcelFileRaw <- function(file, sheet){
  33 +
  34 + if (!file.exists(file)) {
  35 + stop(paste("Error, file [", file, "] not found"))
  36 + }
  37 +
  38 + dataset <- read.xlsx2(file, sheet, header = TRUE)
  39 +
  40 + dataset
  41 +}
  42 +
  43 +#' Process raw data from ISO survey
  44 +#'
  45 +#' ...
  46 +#' @param dataset.raw raw data from ISO Survey excel file
  47 +#'
  48 +#' @return data.frame
  49 +ProccesISOSurveyRaw <- function(dataset.raw){
  50 +#Complete
  51 +}
  52 +
  53 +#ISO_survey_certificates_countries <- read.xlsx2(paste(getwd(), "/Data/ISO/iso_27001_iso_survey2015_preprocessed.xlsx", sep = ""), 1)
  54 +#ISO_survey_sites_countries <- read.xlsx2(paste(getwd(), "/Data/ISO/iso_27001_iso_survey2015_preprocessed.xlsx", sep = ""), 2)
  55 +#ISO_survey_certificates_sector <- read.xlsx2(paste(getwd(), "/Data/ISO/iso_27001_iso_survey2015_preprocessed.xlsx", sep = ""), 3)
... ...
ISO27001effectiveness/data/ISO/Source.txt 0 → 100644
  1 +++ a/ISO27001effectiveness/data/ISO/Source.txt
  1 +http://www.iso.org/iso/iso_27001_iso_survey2015.xls
0 2 \ No newline at end of file
... ...
ISO27001effectiveness/data/ISO/iso_27001_iso_survey2015.xls 0 → 100644
No preview for this file type
ISO27001effectiveness/data/ISO/iso_27001_iso_survey2015_preprocessed.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 April 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 August 2015 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 February 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 January 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 July 2016 Cyber Attacks Timelines.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 June 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 March 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 May 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 November 2015 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 October 2015 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 October 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 September 2015 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-15 September 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/1-16 August 2016 Cyber Attacks Timelines.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-29 February 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 July 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 June 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 November 2015 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 September 2015 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-30 September 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 April 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 August 2015 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 August 2016 Cyber Attacks Timelines.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 January 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 March 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 May 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 October 2015 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/16-31 October 2016 Cyber Attacks Timeline.xlsx 0 → 100644
No preview for this file type
ISO27001effectiveness/data/hackmageddon/Sources.txt 0 → 100644
  1 +++ a/ISO27001effectiveness/data/hackmageddon/Sources.txt
  1 +//2016 GDocs
  2 +https://docs.google.com/spreadsheets/d/1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  3 +https://docs.google.com/spreadsheets/d/1ESdK6WPU-y1D6k-pfBNN7it-3X9uG-wKl-WUnCb4TDk/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  4 +https://docs.google.com/spreadsheets/d/1aoYuZwG6CEZj3agoWGHpnrlyC9_9j-s2F4Vv11LAdGM/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  5 +https://docs.google.com/spreadsheets/d/1ezggZwi1VaxTBJ2D7dYSbf-p0Ai37-cYf2ns7Hy138g/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  6 +https://docs.google.com/spreadsheets/d/1dzR2zJG09UfsGYzE3vNIay2VW__cXyRNibsOoRdt1WM/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  7 +https://docs.google.com/spreadsheets/d/1XwaWcD6mNPh6hNAjRIoqKsaAkciPYck4IpDecqJxQX0/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  8 +https://docs.google.com/spreadsheets/d/17L7qT133AC8OyVVUxFJeWZaKjibR42GQLqLsTZbZjvk/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  9 +https://docs.google.com/spreadsheets/d/15FnVQZxuETyqUAI7MG7QtajBzyU2M7yCZYXC6faqH7Q/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  10 +https://docs.google.com/spreadsheets/d/1UzkzoVjfSzF5XpJtno7vTsP0LuY8mzLPM1yGJDp82R8/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  11 +https://docs.google.com/spreadsheets/d/1z2CY7Vjp2fS5H4RZDJ42ofnnbxwQ-3kaofUzH3NhMP8/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  12 +https://docs.google.com/spreadsheets/d/1gkSfm_rITm_fMuqFudmw4zHZ0oB8XmPvYUJIxUctrzM/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  13 +https://docs.google.com/spreadsheets/d/1rJTODrKeX4h-hQYZ_F3mhH-84U07jpekWcfR781Wsf8/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  14 +https://docs.google.com/spreadsheets/d/1O0JlQiEBxpCJbLit8TRnKInOnuo3X0rGiTfTiy40ILg/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  15 +https://docs.google.com/spreadsheets/d/1GjdTCbmJacCLa8_-t14WvJ-JcnZKv7IEo6MZ2ex7CyU/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  16 +https://docs.google.com/spreadsheets/d/11EfyUlAaZHalafF4Y85TUKJNTCIoQ5moFpDkUlvaD5U/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  17 +https://docs.google.com/spreadsheets/d/11EfyUlAaZHalafF4Y85TUKJNTCIoQ5moFpDkUlvaD5U/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  18 +https://docs.google.com/spreadsheets/d/1wLBVl-B2aSzkaMQ__iAYLJMHXYc2IWelT_oiNgw43TA/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  19 +https://docs.google.com/spreadsheets/d/1c91J5J5kOd4-qAOk9b3vu5HN7LRstctYbApIUf01sa8/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  20 +https://docs.google.com/spreadsheets/d/1O6IDyZhuhV4U9VhSGPcqIcyc-uRjypmnzWTHeaySNNc/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  21 +https://docs.google.com/spreadsheets/d/1qG9AqBTAoNSeKLqwuzKWgT8WmtavJvIENUqrY6zN7z8/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  22 +
  23 +//2015 GDocs
  24 +https://docs.google.com/spreadsheets/d/1mr435q4SmZ-wZyve8aAo2jrRWQNOI1G3KLBUIgMqdCY/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  25 +https://docs.google.com/spreadsheets/d/1J2b-UwukzuoSffTxrsmtEPtdwyDgbHx7EOvWt6t5nBc/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  26 +https://docs.google.com/spreadsheets/d/1lJZLzyti_V5EJHm0BKPHsq39urw-0XdLSufwz8JZGLM/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  27 +https://docs.google.com/spreadsheets/d/1FJ3Bf7BS2JnAGUXbetlV2hs977OMd8zctt_Gv1LhqO4/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  28 +https://docs.google.com/spreadsheets/d/1-sQIxgB9kJGul1d_Q2Jz2EXgTh0NmveVJio2GCaSt98/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  29 +https://docs.google.com/spreadsheets/d/13T0bQDHncE-v707pxEyccOpCsdbAcmy7lHNbtgAQ_Kg/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  30 +https://docs.google.com/spreadsheets/d/1SGvFP5okSEwaQp5706rXcQQ1zdFm9Ks9A03bN-G3TUk/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  31 +https://docs.google.com/spreadsheets/d/16XlzlU17qiOkHKQp2ST69CbIXyY_e2SOi5gy9D9IuyA/export?format=xlsx&id=1J9-Rqba-z3AWmkSndnRa2lp9dbxMBJmKwXjiyxVS1y0
  32 +//2015 HTML (No parseables de momento)
  33 +http://www.hackmageddon.com/2015/07/20/1-15-july-2015-cyber-attacks-timeline/
  34 +http://www.hackmageddon.com/2015/08/03/16-31-july-2015-cyber-attacks-timeline/
  35 +http://www.hackmageddon.com/2015/07/06/16-30-jun-2015-cyber-attacks-timeline/
  36 +http://www.hackmageddon.com/2015/06/03/16-31-may-2015-cyber-attacks-timeline/
  37 +//2015 PNG (No parseables de momento)
  38 +https://i1.wp.com/www.hackmageddon.com/wp-content/uploads/2015/06/1-15-June-2015-Cyber-Attacks-Timeline.png
  39 +https://i1.wp.com/paulsparrows.files.wordpress.com/2015/04/1-15-apr-2015-cyber-attacks-timeline4.png?resize=581%2C3853&ssl=1
  40 +https://i2.wp.com/paulsparrows.files.wordpress.com/2015/05/16-30-apr-2015-cyber-attacks-timeline.png?resize=580%2C3181&ssl=1
  41 +https://i0.wp.com/www.hackmageddon.com/wp-content/uploads/2015/02/1-15-feb-2015-cyber-attacks-timeline.png?w=580
  42 +https://i1.wp.com/paulsparrows.files.wordpress.com/2015/03/16-28-feb-2015-cyber-attacks-timelines1.png?resize=580%2C3578&ssl=1
  43 +https://i0.wp.com/www.hackmageddon.com/wp-content/uploads/2015/03/1-15-Mar-2015-Cyber-Attacks-Timeline.png?w=580
  44 +https://i2.wp.com/paulsparrows.files.wordpress.com/2015/04/16-31-mar-2015-cyber-attacks-timelines.png?resize=580%2C4385&ssl=1
  45 +https://i1.wp.com/paulsparrows.files.wordpress.com/2015/01/1-15-jan-2015-cyber-attacks-timeline.png?resize=580%2C3604&ssl=1
  46 +https://i1.wp.com/paulsparrows.files.wordpress.com/2015/02/16-31-jan-2015-cyber-attacks-timeline.png?resize=580%2C3021&ssl=1
  47 +
  48 +
  49 +
  50 +
... ...