|
2 | 2 | import streamlit as st
|
3 | 3 | import numpy as np
|
4 | 4 | import matplotlib
|
5 |
| -matplotlib.use('Agg') |
| 5 | + |
| 6 | +matplotlib.use("Agg") |
6 | 7 | import matplotlib.pyplot as plt
|
7 | 8 |
|
8 | 9 | hide_menu_style = """
|
|
18 | 19 | bucks = 628341
|
19 | 20 | philly = 1581000
|
20 | 21 | S_default = delaware + chester + montgomery + bucks + philly
|
21 |
| -known_infections = 31 |
| 22 | +known_infections = 53 |
22 | 23 |
|
23 | 24 | # Widgets
|
24 | 25 | initial_infections = st.sidebar.number_input(
|
|
59 | 60 |
|
60 | 61 | st.title("COVID-19 Hospital Impact Model for Epidemics")
|
61 | 62 | st.markdown(
|
62 |
| - """*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/).*""" |
| 63 | + """*This tool was developed by the [Predictive Healthcare team](http://predictivehealthcare.pennmedicine.org/) at |
| 64 | +Penn Medicine. For questions and comments please see our |
| 65 | +[contact page](http://predictivehealthcare.pennmedicine.org/contact/). Code can be found on [Github](https://github.com/pennsignals/chime). |
| 66 | +Join our [Slack channel](https://codeforphilly.org/chat?channel=covid19-chime-penn) if you would like to get involved!*""") |
| 67 | + |
| 68 | +st.markdown( |
| 69 | + """The estimated number of currently infected individuals is **{total_infections:.0f}**. The **{initial_infections}** |
| 70 | +confirmed cases in the region imply a **{detection_prob:.0%}** rate of detection. This is based on current inputs for |
| 71 | +Hospitalizations (**{current_hosp}**), Hospitalization rate (**{hosp_rate:.0%}**), Region size (**{S}**), |
| 72 | +and Hospital market share (**{Penn_market_share:.0%}**).""".format( |
| 73 | + total_infections=total_infections, |
| 74 | + current_hosp=current_hosp, |
| 75 | + hosp_rate=hosp_rate, |
| 76 | + S=S, |
| 77 | + Penn_market_share=Penn_market_share, |
| 78 | + initial_infections=initial_infections, |
| 79 | + detection_prob=detection_prob, |
| 80 | + ) |
63 | 81 | )
|
64 | 82 |
|
65 | 83 | if st.checkbox("Show more info about this tool"):
|
|
104 | 122 | - Chester = {chester}
|
105 | 123 | - Montgomery = {montgomery}
|
106 | 124 | - 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( |
| 125 | + - Philly = {philly}""".format( |
109 | 126 | delaware=delaware,
|
110 | 127 | chester=chester,
|
111 | 128 | montgomery=montgomery,
|
112 | 129 | bucks=bucks,
|
113 | 130 | philly=philly,
|
114 |
| - initial_infections=initial_infections, |
115 |
| - detection_prob=detection_prob, |
116 | 131 | )
|
117 | 132 | )
|
118 | 133 |
|
|
0 commit comments