Kurikulum: tab Peta Visual dari Dashboard Pemetaan CPMK, memakai data versi kurikulum

Visualisasi dashboard-deploy/index.html (Sankey CPL→CPMK→MK, explorer bertingkat,
matriks MK×CPL, kartu MK, deteksi celah) dipindah ke /kurikulum?tab=visual bergaya
Vuexy. Data dibangun dari versi kurikulum yang dibuka (kurikulum.peta_visual), bukan
lagi salinan statis. Explorer menampilkan Sub-CPMK sebagai akordeon per MK; sorotan
CPL/CPMK/MK berlaku lintas panel dan tersimpan di hash URL. Tambahan: heatmap sebaran
CPL per semester.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Power BI Dev
2026-10-17 20:59:37 +07:00
co-authored by Claude Opus 5.5
parent 99a1655f56
commit 2d7e0bd926
6 changed files with 545 additions and 2 deletions
+16
View File
@@ -113,6 +113,22 @@ def matriks(d: dict, jenis: str) -> dict:
MATRIKS = [("pl_cpl", "PL × CPL"), ("cpl_bk", "CPL × BK"), ("bk_mk", "BK × MK"), ("cpl_mk", "CPL × MK")]
def peta_visual(d: dict) -> dict:
"""Data tab Peta Visual (Sankey, explorer, kartu MK, deteksi celah) — MK wajib ber-CPMK, urut semester."""
wajib = sorted(mk_wajib(d), key=lambda x: (x.get("semester") or 99, x["kode"]))
return {
"cpl": {k: {"desk": v.get("desk", ""), "ranah": v.get("ranah") or v.get("aspek", "")}
for k, v in sorted(d["cpl"].items())},
"cpmk": {k: {"cpl": v.get("cpl"), "desk": v.get("desk", "")} for k, v in sorted(d["cpmk"].items())},
"mk": [{"kode": m["kode"], "nama": m["nama"], "semester": m.get("semester"), "sks": m.get("sks"),
"cpmk": [{"kode": c["kode"], "sub": [{"kode": s.get("kode", ""), "uraian": s.get("uraian", "")}
for s in c.get("sub", [])]} for c in m["cpmk"]]}
for m in wajib if m.get("cpmk")],
"tanpa_cpmk": [{"kode": m["kode"], "nama": m["nama"]} for m in wajib if not m.get("cpmk")],
"n_pilihan": len(mk_pilihan(d)),
}
# ═══════════════════ pemeriksa keselarasan ═══════════════════
def periksa(d: dict) -> list[dict]: