Analysis: Compare the frequency of cyber crime in each year.

Load Data

urldata<- "https://raw.githubusercontent.com/kglan/MSDS/main/DATA607/Data%20Transformation/Cyber%20Threats/cyberthreats.csv"
nbad<- read_csv(url(urldata))
## Rows: 8 Columns: 5
## -- Column specification --------------------------------------------------------
## Delimiter: ","
## dbl (5): Year, Adware, Backdoor, Ransomware, Trojan
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
nbad
## # A tibble: 8 x 5
##    Year Adware Backdoor Ransomware Trojan
##   <dbl>  <dbl>    <dbl>      <dbl>  <dbl>
## 1  2022   2242      356       2352    680
## 2  2016   2679      664       3634    429
## 3  2020   1853      523       3122    534
## 4  2019   1634      354       2685    254
## 5  2015   1263      235       1547    336
## 6  2017    856      273       1785    346
## 7  2021    945      195       2073    264
## 8  2018    735      152       1863    174

Combine the different forms of cyber threats into one

nbad <- nbad%>%
  mutate("Total Threats" = Adware + Backdoor + Ransomware + Trojan)

nba<- nbad%>%
  select(c(1,6))
nba
## # A tibble: 8 x 2
##    Year `Total Threats`
##   <dbl>           <dbl>
## 1  2022            5630
## 2  2016            7406
## 3  2020            6032
## 4  2019            4927
## 5  2015            3381
## 6  2017            3260
## 7  2021            3477
## 8  2018            2924

Now we perform the requested analysis on the threats oper year

ggplot(nba, aes(x= Year, y= `Total Threats`))+
  geom_point()+
  geom_line()

Conclusion

We see here that the amount of Cyber threats fluctuates per year based on the custom dataset profided by classmate.