bismillah capekk

This commit is contained in:
Debby
2026-04-03 08:40:30 +07:00
parent f652f2f730
commit 5313039b50
3 changed files with 361 additions and 191 deletions

View File

@@ -177,16 +177,16 @@ def standardize_country_names_asean(df: pd.DataFrame, country_column: str = 'cou
def assign_pillar(indicator_name: str) -> str:
"""
Assign pillar berdasarkan keyword indikator.
Return values: 'Availability', 'Access', 'Utilization', 'Stability', 'Other'
Return values: 'Availability', 'Access', 'Utilization', 'Stability', 'Supporting'
All ≤ 20 chars (varchar(20) constraint).
"""
if pd.isna(indicator_name):
return 'Other'
return 'Supporting'
ind = str(indicator_name).lower()
for kw in ['requirement', 'coefficient', 'losses', 'fat supply']:
if kw in ind:
return 'Other'
return 'Supporting'
if any(kw in ind for kw in [
'adequacy', 'protein supply', 'supply of protein',
@@ -215,7 +215,7 @@ def assign_pillar(indicator_name: str) -> str:
]):
return 'Utilization'
return 'Other'
return 'Supporting'
# =============================================================================