Skip to content

Commit 9b227f5

Browse files
committed
Remove more information about this tool
1 parent 2f96066 commit 9b227f5

File tree

6 files changed

+2
-212
lines changed

6 files changed

+2
-212
lines changed

src/app.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from penn_chime.presentation import (
77
display_download_link,
88
display_header,
9-
display_more_info,
109
display_sidebar,
1110
hide_menu_style,
1211
write_definitions,
@@ -34,10 +33,6 @@
3433

3534
display_header(st, m, p)
3635

37-
if st.checkbox("Show more info about this tool"):
38-
notes = "The total size of the susceptible population will be the entire catchment area for our hospitals."
39-
display_more_info(st=st, model=m, parameters=p, defaults=d, notes=notes)
40-
4136
st.subheader("New Admissions")
4237
st.markdown("Projected number of **daily** COVID-19 admissions. \n\n _NOTE: Now including estimates of prior admissions for comparison._")
4338
admits_chart = build_admits_chart(alt=alt, admits_floor_df=m.admits_floor_df, max_y_axis=p.max_y_axis)

src/chime_dash/app/components/tool_details.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/chime_dash/app/pages/index.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from chime_dash.app.components.base import Component
1111
from chime_dash.app.components.footer import Footer
1212
from chime_dash.app.components.header import Header
13-
from chime_dash.app.components.tool_details import ToolDetails
1413
from chime_dash.app.components.intro import Intro
1514
from chime_dash.app.components.visualizations import Visualizations
1615

@@ -50,7 +49,6 @@ def handle_model_change_helper(pars_json):
5049
max_y_axis=pars.max_y_axis,
5150
)
5251
result.extend(self.components["intro"].build(model, pars))
53-
result.extend(self.components["tool_details"].build(model, pars))
5452
for df_key in ["admits_df", "census_df", "sim_sir_w_date_df"]:
5553
df = None
5654
if model:
@@ -59,11 +57,6 @@ def handle_model_change_helper(pars_json):
5957
return result
6058

6159
super().__init__(language, defaults, [
62-
ChimeCallback( # If user toggles show_additional_projections, show/hide the additional intro content
63-
changed_elements=OrderedDict(show_tool_details="value"),
64-
dom_updates=OrderedDict(more_intro_wrapper="hidden"),
65-
callback_fn=Index.toggle_tool_details
66-
),
6760
ChimeCallback( # If user toggles show_tables, show/hide tables
6861
changed_elements=OrderedDict(show_tables="value"),
6962
dom_updates=OrderedDict(
@@ -77,7 +70,6 @@ def handle_model_change_helper(pars_json):
7770
changed_elements=OrderedDict(pars="children"),
7871
dom_updates=OrderedDict(
7972
intro="children",
80-
more_intro="children",
8173
new_admissions_graph="figure",
8274
new_admissions_table="children",
8375
new_admissions_download="href",
@@ -94,7 +86,6 @@ def handle_model_change_helper(pars_json):
9486
self.components = OrderedDict(
9587
header=Header(language, defaults),
9688
intro=Intro(language, defaults),
97-
tool_details=ToolDetails(language, defaults),
9889
visualizations=Visualizations(language, defaults),
9990
footer=Footer(language, defaults),
10091
)
@@ -113,7 +104,6 @@ def get_html(self):
113104
children=
114105
self.components["header"].html
115106
+ self.components["intro"].html
116-
+ self.components["tool_details"].html
117107
)]
118108
+ self.components["visualizations"].html
119109
+ [Container(

src/chime_dash/app/pages/sidebar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
},
9494
max_y_axis_value={"type": "number", "min": 10, "step": 10, "value": None},
9595
show_tables={"type": "switch", "value": False},
96-
show_tool_details={"type": "switch", "value": False},
9796
)
9897

9998
# Different kind of inputs store different kind of "values"

src/chime_dash/app/templates/en/tool-details.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

src/penn_chime/presentation.py

Lines changed: 2 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def display_header(st, m, p):
6262
Penn Medicine to assist hospitals and public health officials with hospital capacity planning.*"""
6363
)
6464
st.markdown(
65-
"""**Notice**: *There is a high
66-
degree of uncertainty about the details of COVID-19 infection, transmission, and the effectiveness of social distancing
65+
"""**Notice**: *There is a high
66+
degree of uncertainty about the details of COVID-19 infection, transmission, and the effectiveness of social distancing
6767
measures. Long-term projections made using this simplified model of outbreak progression should be treated with extreme caution.*
6868
"""
6969
)
@@ -372,103 +372,6 @@ def display_sidebar(st, d: Parameters) -> Parameters:
372372
)
373373

374374

375-
def display_more_info(
376-
st, model: Model, parameters: Parameters, defaults: Parameters, notes: str = "",
377-
):
378-
"""a lot of streamlit writing to screen."""
379-
st.subheader(
380-
"[Discrete-time SIR modeling](https://mathworld.wolfram.com/SIRModel.html) of infections/recovery"
381-
)
382-
st.markdown(
383-
"""The model consists of individuals who are either _Susceptible_ ($S$), _Infected_ ($I$), or _Recovered_ ($R$).
384-
385-
The epidemic proceeds via a growth and decline process. This is the core model of infectious disease spread and has been in use in epidemiology for many years."""
386-
)
387-
st.markdown("""The dynamics are given by the following 3 equations.""")
388-
389-
st.latex("S_{t+1} = (-\\beta S_t I_t) + S_t")
390-
st.latex("I_{t+1} = (\\beta S_t I_t - \\gamma I_t) + I_t")
391-
st.latex("R_{t+1} = (\\gamma I_t) + R_t")
392-
393-
st.markdown(
394-
"""To project the expected impact to Penn Medicine, we estimate the terms of the model.
395-
396-
To do this, we use a combination of estimates from other locations, informed estimates based on logical reasoning, and best guesses from the American Hospital Association.
397-
398-
399-
### Parameters
400-
401-
The model's parameters, $\\beta$ and $\\gamma$, determine the virulence of the epidemic.
402-
403-
$$\\beta$$ can be interpreted as the _effective contact rate_:
404-
"""
405-
)
406-
st.latex("\\beta = \\tau \\times c")
407-
408-
st.markdown(
409-
"""which is the transmissibility ($\\tau$) multiplied by the average number of people exposed ($$c$$). The transmissibility is the basic virulence of the pathogen. The number of people exposed $c$ is the parameter that can be changed through social distancing.
410-
411-
412-
$\\gamma$ is the inverse of the mean recovery time, in days. I.e.: if $\\gamma = 1/{recovery_days}$, then the average infection will clear in {recovery_days} days.
413-
414-
An important descriptive parameter is the _basic reproduction number_, or $R_0$. This represents the average number of people who will be infected by any given infected person. When $R_0$ is greater than 1, it means that a disease will grow. Higher $R_0$'s imply more rapid growth. It is defined as """.format(
415-
recovery_days=int(parameters.infectious_days)
416-
)
417-
)
418-
st.latex("R_0 = \\beta /\\gamma")
419-
420-
st.markdown(
421-
"""
422-
423-
$R_0$ gets bigger when
424-
425-
- there are more contacts between people
426-
- when the pathogen is more virulent
427-
- when people have the pathogen for longer periods of time
428-
429-
A doubling time of {doubling_time} days and a recovery time of {recovery_days} days imply an $R_0$ of {r_naught:.2f}.
430-
431-
#### Effect of social distancing
432-
433-
After the beginning of the outbreak, actions to reduce social contact will lower the parameter $c$. If this happens at
434-
time $t$, then the number of people infected by any given infected person is $R_t$, which will be lower than $R_0$.
435-
436-
A {relative_contact_rate:.0%} reduction in social contact would increase the time it takes for the outbreak to double,
437-
to {doubling_time_t:.2f} days from {doubling_time:.2f} days, with a $R_t$ of {r_t:.2f}.
438-
439-
#### Using the model
440-
441-
We need to express the two parameters $\\beta$ and $\\gamma$ in terms of quantities we can estimate.
442-
443-
- $\\gamma$: the CDC is recommending 14 days of self-quarantine, we'll use $\\gamma = 1/{recovery_days}$.
444-
- To estimate $$\\beta$$ directly, we'd need to know transmissibility and social contact rates. since we don't know these things, we can extract it from known _doubling times_. The AHA says to expect a doubling time $T_d$ of 7-10 days. That means an early-phase rate of growth can be computed by using the doubling time formula:
445-
""".format(
446-
doubling_time=parameters.doubling_time,
447-
recovery_days=parameters.infectious_days,
448-
r_naught=model.r_naught,
449-
relative_contact_rate=parameters.relative_contact_rate,
450-
doubling_time_t=model.doubling_time_t,
451-
r_t=model.r_t,
452-
)
453-
)
454-
st.latex("g = 2^{1/T_d} - 1")
455-
456-
st.markdown(
457-
"""
458-
- Since the rate of new infections in the SIR model is $g = \\beta S - \\gamma$, and we've already computed $\\gamma$, $\\beta$ becomes a function of the initial population size of susceptible individuals.
459-
$$\\beta = (g + \\gamma)$$.
460-
461-
462-
### Initial Conditions
463-
464-
- {notes} \n
465-
""".format(
466-
notes=notes
467-
)
468-
)
469-
return None
470-
471-
472375
def write_definitions(st):
473376
st.subheader("Guidance on Selecting Inputs")
474377
st.markdown(

0 commit comments

Comments
 (0)