-
Notifications
You must be signed in to change notification settings - Fork 2
/
report.Rmd
77 lines (62 loc) · 1.39 KB
/
report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
title: "Report"
author: "Francisco Bischoff"
date: "on `r format(Sys.time(), '%B %d, %Y')`"
output:
workflowr::wflow_html:
toc: false
editor_options:
chunk_output_type: console
---
```{=html}
<style>
div.polaroid {
width: 80%;
height: auto;
margin-left: auto;
margin-right: auto;
background-color: white;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
svg.svglite {
width: 100%;
height: auto;
}
div.polcont {
text-align: center;
padding-top: 15px;
font-weight: bold;
}
</style>
```
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(here)
library(visNetwork)
library(targets)
```
## Current Work Status
```{r load_target, results='asis'}
fluss_plots <- tar_read("fluss_plots")
files <- names(fluss_plots)
checkmate::qassert(files, "S")
for (f in files) {
alarm <- attr(fluss_plots[[f]], "info")$alarm
true <- attr(fluss_plots[[f]], "info")$true
series <- names(fluss_plots[[f]])
series <- setdiff(series, "time")
for (s in series) {
svg <- attr(fluss_plots[[f]][[s]], "plot")
cat("<div class=\"polaroid\">\n")
cat("<div class=\"polcont\">\n")
cat(sprintf("File: %s - \n", f))
cat(sprintf("Alarm: %s - \n", alarm))
cat(sprintf("True alarm: %s - \n", true))
cat(sprintf("Data stream: %s\n", s))
cat("</div>\n")
cat(svg)
cat("</div><br/>\n")
}
cat("<br/>\n")
}
```