forked from statwonk/openfda-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathui.R
75 lines (74 loc) · 2.7 KB
/
ui.R
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
library(shiny)
shinyUI(fluidPage(
titlePanel(""),
h1("FDA Adverse (Drug) Event Dashboard"), hr(""),
includeMarkdown("welcome.Rmd"),
hr(),
tabsetPanel(
tabPanel("Reports",
br(),
sidebarPanel(
uiOutput("drugs"),
width = 5
),
mainPanel(
tabsetPanel(
tabPanel("By outcome",
h3("Reports by outcome"),
includeMarkdown("outcomes.Rmd"),
plotOutput("outcome_plot"),
h4("Share(s) of outcomes"),
dataTableOutput("outcome_shares"),
hr(),
h4("Total count of outcomes"),
dataTableOutput("outcomes")
),
tabPanel("By reaction",
h3("Count of reports by reaction"),
includeMarkdown("reactions.Rmd"),
dataTableOutput("reactions")
),
tabPanel("Per week",
h3("Count of reports per week"),
includeMarkdown("reports_by_week.Rmd"),
plotOutput("reports"),
checkboxInput("log_scale",
"Log y-axis (can clarify trends)",
value = TRUE),
hr(),
h4("Count of reports per week"),
p("Note: reverse sorted by week, recent weeks first"),
dataTableOutput("reports_by_week")
),
tabPanel("By age",
h3("Reports by age"),
includeMarkdown("age.Rmd"),
plotOutput("ages"),
h4("Ages (% by group)"),
dataTableOutput("age_shares"),
hr(),
h4("Total counts of adverse events by age"),
dataTableOutput("ages_counts")
)
),
fluidRow(
hr(),
div(id = "disqus_thread")
),
width = 8
)
),
tabPanel("About", br(),
includeMarkdown("about1.Rmd"),
textOutput("deaths"), br(),
includeMarkdown("about2.Rmd")
)
),
tags$head(
tags$script(src="disqus.js"),
tags$script("$(function() {$.fn.dataTableExt.errMode = 'none';});"),
tags$link(rel = "stylesheet",
type = "text/css",
href = "base.css")
)
))