Skip to content

Commit

Permalink
adding heading box + styling
Browse files Browse the repository at this point in the history
  • Loading branch information
thibautjombart committed Mar 29, 2020
1 parent cd2bd58 commit 0924573
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 9 deletions.
10 changes: 7 additions & 3 deletions app/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ admitsPanel <- function(prefix, tabtitle) {
tabPanel(tabtitle, sidebarLayout(position = "left",
sidebarPanel(
chooseSliderSkin("Shiny", color = slider_color),
actionButton(fmtr("run"), "Run model", icon("play"),
style = "align:right"),
h2("Starting conditions", style = sprintf("color:%s", cmmid_color)),
p("Data inputs specifying the starting point of the forecast: a number of new COVID-19 admissions on a given date at the location considered. Reporting refers to the % of admissions notified.",
style = sprintf("color:%s", annot_color)),
Expand All @@ -56,6 +58,7 @@ admitsPanel <- function(prefix, tabtitle) {
value = 100,
step = 5
),
br(),
h2("Model parameters", style = sprintf("color:%s", cmmid_color)),
p("Parameter inputs specifying the COVID-19 epidemic growth as doubling time and associated uncertainty. Use more simulations to account for uncertainty in doubling time and length of hospital stay.",
style = sprintf("color:%s", annot_color)),
Expand Down Expand Up @@ -93,9 +96,10 @@ admitsPanel <- function(prefix, tabtitle) {
value = 30,
step = 10
),
actionButton(fmtr("run"), "Run model", icon("play")),
),
mainPanel(
includeMarkdown("include/heading_box.md"),
br(),
plotOutput(fmtr("main_plot"), width = "60%", height = "400px"),
br(),
checkboxInput(fmtr("show_los"), "Show duration of hospitalisation", FALSE),
Expand Down Expand Up @@ -123,8 +127,8 @@ ui <- navbarPage(
windowTitle = app_title,
theme = "styling.css",
position="fixed-top", collapsible = TRUE,
admitsPanel(prefix="gen_", tabtitle="General"),
admitsPanel(prefix="icu_", tabtitle="ICU"),
admitsPanel(prefix = "gen_", tabtitle = "Non-critical care"),
admitsPanel(prefix = "icu_", tabtitle = "Critical care"),
tabPanel("Overall", mainPanel(
plotOutput("gen_over_plot"),
br(),
Expand Down
27 changes: 27 additions & 0 deletions app/include/heading_box.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@


<div class = "heading_box">

<strong> <font size="+1">Welcome to the bed occupancy forecasting app</font></strong>
<br>
<strong>Summary</strong>
<br>

Forecast bed occupancy for COVID-19 patients using recent data on admission and
an exponential growth model. You can choose to model critical or non-critical
care beds using the two separate tabs. Use the panel on the left to input data
and specify model parameters.


<br>
<br>
<strong>About the model</strong>
<br>

Click on the information tab for details on the model, parameters used, and
contact information. This app generalises the approach used in <a href =
"https://cmmid.github.io/topics/covid19/current-patterns-transmission/ICU-projections.html"
taget = "_blank"> this post</a> which focused only on critical care beds in
England. Note that this work is under peer-review. Find us on <a href=https://github.com/thibautjombart/covid19_bed_occupancy/issues/ target = "_blank">github</a> for questions and requests.

</div>
20 changes: 14 additions & 6 deletions app/include/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@

## Model Description

This app implements a model to forecast COVID19 bed requirements based on a
starting point of admissions on a given date, a user-inputted epidemic growth
rate, and an assumed distribution of length of stay after admission. This
forecast can be adjusted to accommodate a certain assumed reporting percentage,
This app can be used to forecast COVID-19 bed requirements for up to 21 days in
a given location (e.g. a healthcare facility, a county, a state). Data on a
number of reported admissions on a given date are used to define the starting
point of the model. Future admissions are simulated using an exponential model
and length of hospital stay for each new admitted patient is simulated using
pre-specified distributions, depending on the type of hospitalisation (critical
or non-critical care).

Forecast can be adjusted to accommodate a certain assumed reporting percentage,
if it is considered plausible that some hospitalised cases may not have their
data reported. This may occur, for example, if admission rates are high and
staff have limited opportunity to update the database with new records.


Bed occupancies for non-critical care and critical care are modelled separately
(see caveats).

This app generalises a model used for predicting COVID-19 critical care bed requirements in
England introduced in
[this post](https://cmmid.github.io/topics/covid19/current-patterns-transmission/ICU-projections.html).



### Summary

Expand Down
20 changes: 20 additions & 0 deletions app/www/styling.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,23 @@ hr { margin:5px; border-top: 1px solid grey; }
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}


.heading_box {
margin-top: 0px;
margin-bottom: 20px;
padding: 20px 20px 15px 20px;
border: 1px solid #A7A8AA;
width: 70%;
box-shadow: 1px 1px 2px 2px #A7A8AA;
border-radius: 5px;
}
.heading_box p {
font-size: 16px;
font-color: #69716F;
line-height: 1;
margin: 0 0 6px;
}
.heading_box strong {
color: #0D5257;
margin: 0 0 10px;
}

0 comments on commit 0924573

Please sign in to comment.