Skip to content

Commit 5b5c398

Browse files
author
Michael Becker
committed
app: Update parameters
Also add in an explanation of the variables being input into the model
1 parent f07505e commit 5b5c398

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

app.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import streamlit as st
33
import numpy as np
44
import matplotlib
5-
matplotlib.use('Agg')
5+
6+
matplotlib.use("Agg")
67
import matplotlib.pyplot as plt
78

89
hide_menu_style = """
@@ -18,7 +19,7 @@
1819
bucks = 628341
1920
philly = 1581000
2021
S_default = delaware + chester + montgomery + bucks + philly
21-
known_infections = 31
22+
known_infections = 53
2223

2324
# Widgets
2425
initial_infections = st.sidebar.number_input(
@@ -62,6 +63,21 @@
6263
"""*This tool was developed by the [Predictive Healthcare team](http://predictivehealthcare.pennmedicine.org/) at Penn Medicine. For questions and comments please see our [contact page](http://predictivehealthcare.pennmedicine.org/contact/).*"""
6364
)
6465

66+
st.markdown(
67+
"""The estimated number of currently infected individuals is **{total_infections:.0f}**. The **{initial_infections}**
68+
confirmed cases in the region imply a **{detection_prob:.0%}** rate of detection. This is based on current inputs for
69+
Hospitalizations (**{current_hosp}**), Hospitalization rate (**{hosp_rate:.0%}**), Region size (**{S}**),
70+
and Hospital market share (**{Penn_market_share:.0%}**).""".format(
71+
total_infections=total_infections,
72+
current_hosp=current_hosp,
73+
hosp_rate=hosp_rate,
74+
S=S,
75+
Penn_market_share=Penn_market_share,
76+
initial_infections=initial_infections,
77+
detection_prob=detection_prob,
78+
)
79+
)
80+
6581
if st.checkbox("Show more info about this tool"):
6682
st.subheader(
6783
"[Discrete-time SIR modeling](https://mathworld.wolfram.com/SIRModel.html) of infections/recovery"
@@ -104,15 +120,12 @@
104120
- Chester = {chester}
105121
- Montgomery = {montgomery}
106122
- Bucks = {bucks}
107-
- Philly = {philly}
108-
- The initial number of infected will be the total number of confirmed cases in the area ({initial_infections}), divided by some detection probability to account for under testing {detection_prob:.2f}.""".format(
123+
- Philly = {philly}""".format(
109124
delaware=delaware,
110125
chester=chester,
111126
montgomery=montgomery,
112127
bucks=bucks,
113128
philly=philly,
114-
initial_infections=initial_infections,
115-
detection_prob=detection_prob,
116129
)
117130
)
118131

0 commit comments

Comments
 (0)