Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REMOVED] charts and unused text #18

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 23 additions & 29 deletions pages/02_financial_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ def claim_type_line_chart(df, animated=True):
## --------------------------------- ##
pmpm_claim_type_data = data.pmpm_by_claim_type()
pmpm_claim_type_data.sort_values(by="year_month", inplace=True)
st.markdown("## Claim Type")
st.markdown(
"""
Explore the per member per month costs across different claim types to gain insights into healthcare expenditure patterns. Inpatient spend will tend to be much higher than professional spend. Dig deeper to find out what is hidden in these costs.
"""
)

## --------------------------------- ##
## Header
Expand Down Expand Up @@ -229,29 +223,29 @@ def claim_type_line_chart(df, animated=True):

st.altair_chart(service_1_chart, use_container_width=True)

chart_vals = ["Ancillary", "Inpatient", "Office Visit", "Other", "Outpatient"]
grouped_service = service_1_data.groupby(by="service_category_1", as_index=False)[
"paid_amount_sum"
].sum()
total_member_months = (
service_1_data[["year_month", "member_month_count"]]
.drop_duplicates()["member_month_count"]
.sum()
)
grouped_service["paid_amount_pmpm"] = (
grouped_service["paid_amount_sum"] / total_member_months
)
grouped_service.set_index("service_category_1", inplace=True)
grouped_service = grouped_service.transpose()
grouped_service["Metric"] = "Average PMPM"
plost.bar_chart(
data=grouped_service,
bar="Metric",
value=chart_vals,
stack="normalize",
direction="horizontal",
height=200,
)
# chart_vals = ["Ancillary", "Inpatient", "Office Visit", "Other", "Outpatient"]
# grouped_service = service_1_data.groupby(by="service_category_1", as_index=False)[
# "paid_amount_sum"
# ].sum()
# total_member_months = (
# service_1_data[["year_month", "member_month_count"]]
# .drop_duplicates()["member_month_count"]
# .sum()
# )
# grouped_service["paid_amount_pmpm"] = (
# grouped_service["paid_amount_sum"] / total_member_months
# )
# grouped_service.set_index("service_category_1", inplace=True)
# grouped_service = grouped_service.transpose()
# grouped_service["Metric"] = "Average PMPM"
# plost.bar_chart(
# data=grouped_service,
# bar="Metric",
# value=chart_vals,
# stack="normalize",
# direction="horizontal",
# height=200,
# )

## --------------------------------- ##
## Service Category 2
Expand Down