Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -407,7 +407,7 @@ if 'temuan_kode_distrik' in df_local.columns:
|
|
| 407 |
col1, col2 = st.columns(2)
|
| 408 |
|
| 409 |
with col1:
|
| 410 |
-
st.markdown("<h5>Unit Pembangkit: Avg Monthly Finding
|
| 411 |
if not avg_ratio_pg.empty:
|
| 412 |
color_discrete_map_pg = get_color_map(avg_ratio_pg['nama_perusahaan'])
|
| 413 |
fig_pg = px.pie(
|
|
@@ -425,7 +425,7 @@ if 'temuan_kode_distrik' in df_local.columns:
|
|
| 425 |
top_company_pg = avg_ratio_pg.loc[avg_ratio_pg['avg_monthly_ratio'].idxmax()]
|
| 426 |
low_company_pg = avg_ratio_pg.loc[avg_ratio_pg['avg_monthly_ratio'].idxmin()]
|
| 427 |
|
| 428 |
-
st.markdown("### Insight
|
| 429 |
insight_text = (
|
| 430 |
f"<div class='ai-insight'>"
|
| 431 |
f"In PG Area, <strong>{top_company_pg['nama_perusahaan']}</strong> has the highest average finding-to-person ratio "
|
|
@@ -440,7 +440,7 @@ if 'temuan_kode_distrik' in df_local.columns:
|
|
| 440 |
st.warning("No data for PG area or all ratios are NaN.")
|
| 441 |
|
| 442 |
with col2:
|
| 443 |
-
st.markdown("<h5>Unit Maintenance: Avg Monthly Finding
|
| 444 |
if not avg_ratio_um.empty:
|
| 445 |
color_discrete_map_um = get_color_map(avg_ratio_um['nama_perusahaan'])
|
| 446 |
fig_um = px.pie(
|
|
@@ -458,7 +458,7 @@ if 'temuan_kode_distrik' in df_local.columns:
|
|
| 458 |
top_company_um = avg_ratio_um.loc[avg_ratio_um['avg_monthly_ratio'].idxmax()]
|
| 459 |
low_company_um = avg_ratio_um.loc[avg_ratio_um['avg_monthly_ratio'].idxmin()]
|
| 460 |
|
| 461 |
-
st.markdown("### Insight
|
| 462 |
insight_text = (
|
| 463 |
f"<div class='ai-insight'>"
|
| 464 |
f"In UM Area, <strong>{top_company_um['nama_perusahaan']}</strong> exhibits the highest average finding-to-person ratio "
|
|
|
|
| 407 |
col1, col2 = st.columns(2)
|
| 408 |
|
| 409 |
with col1:
|
| 410 |
+
st.markdown("<h5>Unit Pembangkit: Avg Monthly Finding by Company</h5>", unsafe_allow_html=True)
|
| 411 |
if not avg_ratio_pg.empty:
|
| 412 |
color_discrete_map_pg = get_color_map(avg_ratio_pg['nama_perusahaan'])
|
| 413 |
fig_pg = px.pie(
|
|
|
|
| 425 |
top_company_pg = avg_ratio_pg.loc[avg_ratio_pg['avg_monthly_ratio'].idxmax()]
|
| 426 |
low_company_pg = avg_ratio_pg.loc[avg_ratio_pg['avg_monthly_ratio'].idxmin()]
|
| 427 |
|
| 428 |
+
st.markdown("### Insight")
|
| 429 |
insight_text = (
|
| 430 |
f"<div class='ai-insight'>"
|
| 431 |
f"In PG Area, <strong>{top_company_pg['nama_perusahaan']}</strong> has the highest average finding-to-person ratio "
|
|
|
|
| 440 |
st.warning("No data for PG area or all ratios are NaN.")
|
| 441 |
|
| 442 |
with col2:
|
| 443 |
+
st.markdown("<h5>Unit Maintenance: Avg Monthly Finding by Company</h5>", unsafe_allow_html=True)
|
| 444 |
if not avg_ratio_um.empty:
|
| 445 |
color_discrete_map_um = get_color_map(avg_ratio_um['nama_perusahaan'])
|
| 446 |
fig_um = px.pie(
|
|
|
|
| 458 |
top_company_um = avg_ratio_um.loc[avg_ratio_um['avg_monthly_ratio'].idxmax()]
|
| 459 |
low_company_um = avg_ratio_um.loc[avg_ratio_um['avg_monthly_ratio'].idxmin()]
|
| 460 |
|
| 461 |
+
st.markdown("### Insight")
|
| 462 |
insight_text = (
|
| 463 |
f"<div class='ai-insight'>"
|
| 464 |
f"In UM Area, <strong>{top_company_um['nama_perusahaan']}</strong> exhibits the highest average finding-to-person ratio "
|