feat: finalize empirical ordinal tier rankings, fix entity collisions, and dual-mode dashboard
HIFFI Multi-Platform CI / test (3.11) (push) Failing after 31s
HIFFI Multi-Platform CI / test (3.12) (push) Failing after 31s

This commit is contained in:
Srilekha committed 2026-10-31 14:43:43 +05:30
1 parent 6d421258f1
commit 85e6395770
14 files changed
+18835 -532

No files matched your search

@@ -0,0 +1,32 @@
import os
import pandas as pd
DATA_DIR = "data"
SALES_PATH = os.path.join(DATA_DIR, "master_sales_17k_verified.csv")
OUTPUT_PATH = os.path.join(DATA_DIR, "master_artists_intelligence_17k.csv")
df = pd.read_csv(SALES_PATH)
def assign_tier(row):
prov = str(row.get("provenance", ""))
units = row.get("audited_sales_units", 0)
if prov == "VERIFIED_CSPC":
return "TIER_1_GLOBAL_SUPERSTAR_CSPC"
elif prov == "VERIFIED_RIAA":
if pd.notna(units) and units >= 10_000_000:
return "TIER_2A_MAJOR_COMMERCIAL_CORE"
return "TIER_2B_CERTIFIED_CATALOG"
# Provenance UNVERIFIED_NO_RECORDS
return "TIER_3_UNAUDITED_DIGITAL_CATALOG"
df["catalog_intelligence_tier"] = df.apply(assign_tier, axis=1)
print("--- CATALOG INTELLIGENCE TIER DISTRIBUTION ---")
print(df["catalog_intelligence_tier"].value_counts())
df.to_csv(OUTPUT_PATH, index=False)
print(f"\nFinal catalog exported to: {OUTPUT_PATH}")