syndromic_page | R Documentation |
syndromic_page
A simple command to generate an html page that summarizes the current
state of a syndromic (syndromicD
or syndromicW
) object. A "html" folder is created (or used if already existing)
into the current working directory.
syndromic_page(x, ...) ## S4 method for signature 'syndromicD' syndromic_page(x, tpoints.display = 7, window = 365, baseline = TRUE, UCL = 1, algorithms = NULL, limit = 1, file.name = "my.syndromic", title = "My syndromic", data.page = FALSE, data = NULL, date.format = "%d/%m/%Y", dates.var = NULL, syndromes.var = NULL, color.null = "F8F8FF", color.low = "F8FF2F", color.alarm = "FF0000", scale = 9, fill.colors = c("yellow2", "orange", "tomato"), arrow.colors = c("green", "orange", "tomato", "red")) ## S4 method for signature 'syndromicW' syndromic_page(x, tpoints.display = 4, window = 52, baseline = TRUE, UCL = 1, algorithms = NULL, limit = 1, file.name = "my.syndromic", title = "My syndromic", data.page = FALSE, data = NULL, date.format = "ISOweek", dates.var = NULL, syndromes.var = NULL, color.null = "F8F8FF", color.low = "F8FF2F", color.alarm = "FF0000", scale = 9, fill.colors = c("yellow2", "orange", "tomato"), arrow.colors = c("green", "orange", "tomato", "red"))
x |
a syndromic ( |
... |
Additional arguments to the method. |
tpoints.display |
This is used to choose how many days of alarms to display. The
normal for daily data (syndromic object provided is form the class |
window |
the number of time points to plot, always finishing at the last time point recorded, or the date specified in the parameter "date" above. |
baseline |
whether to plot the baseline, by default equal to TRUE. |
UCL |
the dimension of the slot UCL, from the syndromic object, from which the user wants to plot the UCL. Set to NULL or to 0 if it is not desired to plot the UCL. |
algorithms |
an optional parameter specifying which dimensions of the alarm slot to plot and sum for a final alarm score. If not specified (NULL), all are plotted. If set to zero, none are plotted. |
limit |
the parameter specifying the limit above which alarms are
considered meaningful. Only important if the user has specified that only
syndromes with an alarm are to be plotted. Remember that this is not a statistical
value, but the sum of the scores of each individual detection algorithm. If for
instance the syndromic object has been subjected to detection using a
|
file.name |
an optional text to add to the date being evaluated, as the name of the file to be saved. |
title |
a tile for the html page. If not given the value in "file.name" is used. |
data.page |
the user should specify whether the plots should also provide a link to the original data, so that page viewers can inspect the original data. If using TRUE, the original data must be provided in the argument "data". |
data |
the original data to tabulate in case "data.page" has been set to TRUE. |
date.format |
the date format in the original data, if provided in the previous argument.
For WEEKLY data, the original data may have been recorded daily or weekly (see
|
dates.var |
the variable (column) in data to look for dates, in order to find the data from last week. |
syndromes.var |
the variable (column) in data to match to the syndromes found in the slot observed |
color.null |
a color for the table of alarms, used in cells giving the number of syndromic events which corresponded to NO alarm. |
color.low |
a color for the table of alarms, used in cells giving the number of syndromic events which generated an alarm score higher than 0, but lower than the limit for alarms. |
color.alarm |
a color for the table of alarms, used in cells giving the number of syndromic events which corresponded to an alarm. |
scale |
the maximum possible score (scale of alarms). Based on the number of detection algorithms used, and the number of detection limits set to each (3 algorithms with 5 detection limits for each, for instance, will give a scale of 15) |
fill.colors |
the colors to be used for the 3 degrees of alarm. By default they are yellow, orange and light red (tomato). |
arrow.colors |
the colors of the arrow for varying levels of alarm. By default green is used when the score is zero, and a progressive scale is used for increasing scores: orange, tomato and red. |
##DAILY data data(lab.daily) my.syndromicD <- raw_to_syndromicD (id=SubmissionID, syndromes.var=Syndrome, dates.var=DateofSubmission, date.format="%d/%m/%Y", remove.dow=c(6,0), add.to=c(2,1), data=lab.daily) my.syndromicD <- holt_winters_synd(x=my.syndromicD, evaluate.window=30, frequency=5, baseline.window=260) syndromic_page (x=my.syndromicD, tpoints.display=5, file.name="SpeciesX", title="Lab data daily for Species X", data.page=TRUE, data=lab.daily, date.format="%d/%m/%Y", dates.var="DateofSubmission", syndromes.var="Syndrome", scale=9) ##WEEKLY data(lab.weekly) my.syndromicW <- raw_to_syndromicW (id=lab.weekly$SubmissionID, syndromes.var=lab.weekly$Syndrome, week.var=lab.weekly$DateofSubmission) my.syndromicW <- ewma_synd(x=my.syndromicW, evaluate.window=10, limit.sd=c(2.5,3,3.5), pre.process="diff", diff.window=4) syndromic_page (x=my.syndromicW, tpoints.display=4, file.name="SpeciesX", title="Lab data daily for Species X", data.page=TRUE, data=lab.weekly, date.format="ISOweek", dates.var="DateofSubmission", syndromes.var="Syndrome", scale=9) data(lab.daily) my.syndromicW2 <- raw_to_syndromicW (id=SubmissionID, syndromes.var=Syndrome, dates.var=DateofSubmission, date.format="%d/%m/%Y", data=lab.daily) my.syndromicW2 <- ewma_synd(x=my.syndromicW2, evaluate.window=10, limit.sd=c(2.5,3,3.5), pre.process="diff", diff.window=4) syndromic_page(x=my.syndromicW2, tpoints.display=4, file.name="SpeciesX", title="Lab data daily for Species X", data.page=TRUE, data=lab.daily, date.format="%d/%m/%Y", dates.var="DateofSubmission", syndromes.var="Syndrome", scale=9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.