library(EpiSignalDetection)
## Warning: package 'EpiSignalDetection' was built under R version 4.4.2
library(fs)
## Warning: package 'fs' was built under R version 4.4.2
my_dataset <- EpiSignalDetection::importAtlasExport("data/ECDC_surveillance_data_Pertussis_20180717.csv")

my_own_dataset <- EpiSignalDetection::importAtlasExport("data/ECDC_surveillance_data_Salmonellosis.csv")

Cleaning

my_dataset <- EpiSignalDetection::cleanAtlasExport(my_dataset)

Setting

my_input <- list(
  disease = "Pertussis",
  country = "France",
  indicator = "Reported cases",
  stratification = "All cases",
  unit = "Month",
  daterange = c("2012-01-01", "2016-12-31"),
  algo = "FarringtonFlexible",
  testingperiod = 6
)

Preparation

my_dataset <- EpiSignalDetection::filterAtlasExport(my_dataset, my_input)

Aggregation

my_dataset <- EpiSignalDetection::aggAtlasExport(my_dataset, my_input)
## Warning in EpiSignalDetection::aggAtlasExport(my_dataset, my_input): The
## selected country presents with at least one gap in the time series
## Warning: `group_by_()` was deprecated in dplyr 0.7.0.
## ℹ Please use `group_by()` instead.
## ℹ See vignette('programming') for more help
## ℹ The deprecated feature was likely used in the EpiSignalDetection package.
##   Please report the issue to the authors.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

Plotting

EpiSignalDetection::plotSD(x = my_dataset, input = my_input)

Report Alarms

my_input <- list(
  file = list(datapath = "D:/Nauka/ECDC_survilance/data/ECDC_surveillance_data_Pertussis_20180717.csv"),
  disease = "Pertussis",
  country = "Germany",
  indicator = "Reported cases",
  stratification = "All cases",
  unit = "Month",
  daterange = c("2008-12-01", "2016-12-01"),
  algo = "FarringtonFlexible",
  testingperiod = 12
)
runEpiSDReport(input = my_input)
## 
## 
## processing file: SignalDetectionReport.Rmd
##   |                                                  |                                          |   0%  |                                                  |...                                       |   7%                              |                                                  |......                                    |  13% [Config]                     |                                                  |........                                  |  20%                              |                                                  |...........                               |  27% [Parameters]                 |                                                  |..............                            |  33%                              |                                                  |.................                         |  40% [StudyPeriod]                |                                                  |....................                      |  47%                              |                                                  |......................                    |  53% [Gaps]                       |                                                  |.........................                 |  60%                              |                                                  |............................              |  67% [GraphByReportingCountries]  |                                                  |...............................           |  73%                              |                                                  |..................................        |  80% [LoopByCountry]              |                                                  |....................................      |  87%                              |                                                  |.......................................   |  93% [AlarmTable]                 |                                                  |..........................................| 100%                            
## output file: SignalDetectionReport.knit.md
## "C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS SignalDetectionReport.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc33146a047aee.html --lua-filter "C:\Users\aleks\AppData\Local\R\win-library\4.4\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\aleks\AppData\Local\R\win-library\4.4\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --variable bs3=TRUE --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template "C:\Users\aleks\AppData\Local\R\win-library\4.4\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --number-sections --variable theme=united --css style.css --mathjax --variable "mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --include-in-header "C:\Users\aleks\AppData\Local\Temp\RtmpGu9hIM\rmarkdown-str3314276a23e4.html"
## 
## Output created: C:\Users\aleks\AppData\Local\Temp\RtmpGu9hIM/SignalDetectionReport.html

Kopiraj fajl

file_copy("C:/Users/aleks/AppData/Local/Temp/Rtmp63iSD6/SignalDetectionReport.html", 
         "D:/Nauka/ECDC_survilance/output", 
         overwrite = FALSE)