|
19 | 19 | )
|
20 | 20 | from penn_chime.settings import DEFAULTS
|
21 | 21 | from penn_chime.models import sim_sir_df, build_admissions_df, build_census_df
|
22 |
| -from penn_chime.charts import ( |
23 |
| - additional_projections_chart, |
24 |
| - admitted_patients_chart, |
25 |
| - new_admissions_chart, |
26 |
| -) |
27 |
| - |
| 22 | +from penn_chime.charts import (additional_projections_chart, |
| 23 | + admitted_patients_chart, |
| 24 | + new_admissions_chart, |
| 25 | + chart_descriptions) |
28 | 26 | # This is somewhat dangerous:
|
29 | 27 | # Hide the main menu with "Rerun", "run on Save", "clear cache", and "record a screencast"
|
30 | 28 | # This should not be hidden in prod, but removed
|
|
51 | 49 |
|
52 | 50 | st.subheader("New Admissions")
|
53 | 51 | st.markdown("Projected number of **daily** COVID-19 admissions at Penn hospitals")
|
| 52 | +new_admit_chart = new_admissions_chart(alt, admissions_df, parameters=p, as_date=as_date) |
54 | 53 | st.altair_chart(
|
55 |
| - new_admissions_chart(alt, admissions_df, parameters=p, as_date=as_date), |
56 |
| - use_container_width=True, |
| 54 | + new_admit_chart, use_container_width=True |
57 | 55 | )
|
| 56 | + |
| 57 | +st.markdown(chart_descriptions(new_admit_chart)) |
| 58 | + |
58 | 59 | if st.checkbox("Show Projected Admissions in tabular form"):
|
59 | 60 | draw_projected_admissions_table(st, admissions_df, as_date=as_date)
|
60 | 61 | st.subheader("Admitted Patients (Census)")
|
61 | 62 | st.markdown(
|
62 | 63 | "Projected **census** of COVID-19 patients, accounting for arrivals and discharges at Penn hospitals"
|
63 | 64 | )
|
| 65 | +admit_chart = admitted_patients_chart(alt=alt, census=census_df, parameters=p, as_date=as_date) |
64 | 66 | st.altair_chart(
|
65 |
| - admitted_patients_chart(alt=alt, census=census_df, parameters=p, as_date=as_date), |
66 |
| - use_container_width=True, |
| 67 | + admit_chart, use_container_width=True |
67 | 68 | )
|
| 69 | +st.markdown(chart_descriptions(admit_chart, True)) |
68 | 70 | if st.checkbox("Show Projected Census in tabular form"):
|
69 | 71 | draw_census_table(st, census_df, as_date=as_date)
|
70 | 72 | st.markdown(
|
|
0 commit comments