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