Analysis/_bmad-output/planning-artifacts/ux-visual-visualizer.html
2026-01-11 22:56:02 +01:00

257 lines
17 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Data_analysis - UX Visual Foundation</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
mono: ['JetBrains Mono', 'monospace'],
},
colors: {
primary: '#4f46e5', // Indigo 600
success: '#10b981', // Emerald 500
danger: '#f43f5e', // Rose 500
surface: '#f8fafc', // Slate 50
border: '#e2e8f0', // Slate 200
}
}
}
}
</script>
<style>
.grid-cell { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.dense-padding { padding: 4px 8px; }
.shimmer {
background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
</style>
</head>
<body class="bg-slate-50 font-sans text-slate-900 flex h-screen overflow-hidden">
<!-- Sidebar Simulation -->
<aside class="w-64 border-r border-slate-200 bg-white flex flex-col">
<div class="p-6 border-b border-slate-200">
<h1 class="text-xl font-bold text-indigo-600 flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bar-chart-big"><path d="M3 3v18h18"/><rect width="4" height="7" x="7" y="10" rx="1"/><rect width="4" height="12" x="15" y="5" rx="1"/></svg>
Data_analysis
</h1>
</div>
<nav class="p-4 flex-1 space-y-1">
<a href="#" class="flex items-center gap-3 px-3 py-2 text-sm font-medium text-slate-900 bg-slate-100 rounded-md">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M9 3v18"/></svg>
Workspace (Grid)
</a>
<a href="#" class="flex items-center gap-3 px-3 py-2 text-sm font-medium text-slate-600 hover:bg-slate-50 rounded-md transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3v18h18"/><path d="m19 9-5 5-4-4-3 3"/></svg>
Regressions
</a>
<a href="#" class="flex items-center gap-3 px-3 py-2 text-sm font-medium text-slate-600 hover:bg-slate-50 rounded-md transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/></svg>
Reports
</a>
</nav>
<div class="p-4 border-t border-slate-200">
<div class="bg-slate-100 p-3 rounded-lg text-xs space-y-2">
<p class="font-semibold text-slate-500 uppercase tracking-wider">System Status</p>
<div class="flex items-center gap-2">
<span class="w-2 h-2 rounded-full bg-success"></span>
<span>Python Backend: IDLE</span>
</div>
</div>
</div>
</aside>
<!-- Main Workspace -->
<main class="flex-1 flex flex-col overflow-hidden bg-white">
<!-- Top Toolbar -->
<header class="h-14 border-b border-slate-200 flex items-center justify-between px-6">
<div class="flex items-center gap-4">
<span class="text-sm font-semibold text-slate-500">Project:</span>
<span class="text-sm font-medium">Production_Quality_Jan2026.xlsx</span>
<span class="px-2 py-0.5 bg-indigo-50 text-indigo-700 text-[10px] font-bold rounded uppercase tracking-wider">Stateless Session</span>
</div>
<div class="flex items-center gap-3">
<button class="flex items-center gap-2 px-3 py-1.5 text-xs font-medium text-slate-600 hover:bg-slate-50 border border-slate-200 rounded transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg>
Download PDF
</button>
<button class="bg-indigo-600 text-white px-4 py-1.5 text-xs font-semibold rounded hover:bg-indigo-700 transition-shadow shadow-sm shadow-indigo-200">
Run Regression
</button>
</div>
</header>
<!-- The "Smart Grid" -->
<div class="flex-1 overflow-auto bg-slate-50 relative">
<table class="w-full border-separate border-spacing-0 bg-white">
<thead class="sticky top-0 bg-white z-10">
<tr>
<th class="border-b border-r border-slate-200 dense-padding bg-slate-50 w-10"></th>
<th class="border-b border-r border-slate-200 dense-padding text-left group">
<div class="flex flex-col gap-1">
<div class="flex items-center justify-between text-[11px] text-slate-500">
<span class="font-mono uppercase">C1</span>
<span class="bg-blue-50 text-blue-600 px-1 rounded">Num</span>
</div>
<span class="text-sm">Temperature_C</span>
<div class="h-4 flex items-end gap-0.5 mt-1">
<div class="bg-indigo-200 w-full h-[20%]"></div>
<div class="bg-indigo-200 w-full h-[40%]"></div>
<div class="bg-indigo-400 w-full h-[90%]"></div>
<div class="bg-indigo-400 w-full h-[100%]"></div>
<div class="bg-indigo-200 w-full h-[30%]"></div>
</div>
</div>
</th>
<th class="border-b border-r border-slate-200 dense-padding text-left group relative">
<div class="flex flex-col gap-1">
<div class="flex items-center justify-between text-[11px] text-slate-500">
<span class="font-mono uppercase">C2</span>
<span class="bg-blue-50 text-blue-600 px-1 rounded">Num</span>
</div>
<span class="text-sm">Pressure_Bar</span>
<div class="h-4 flex items-end gap-0.5 mt-1">
<div class="bg-indigo-200 w-full h-[60%]"></div>
<div class="bg-indigo-400 w-full h-[100%]"></div>
<div class="bg-indigo-200 w-full h-[40%]"></div>
<div class="bg-rose-400 w-full h-[10%]"></div> <!-- Outlier peak -->
</div>
</div>
<!-- Warning Badge -->
<div class="absolute -top-1 -right-1 bg-rose-500 text-white w-4 h-4 rounded-full flex items-center justify-center text-[10px] font-bold shadow-sm cursor-pointer hover:scale-110 transition-transform">!</div>
</th>
<th class="border-b border-r border-slate-200 dense-padding text-left">
<div class="flex flex-col gap-1">
<div class="flex items-center justify-between text-[11px] text-slate-500">
<span class="font-mono uppercase">C3</span>
<span class="bg-amber-50 text-amber-600 px-1 rounded">Cat</span>
</div>
<span class="text-sm">Machine_ID</span>
<div class="flex gap-1 mt-1">
<span class="w-full h-1 bg-slate-200 rounded"></span>
<span class="w-full h-1 bg-slate-200 rounded"></span>
<span class="w-full h-1 bg-slate-200 rounded"></span>
</div>
</div>
</th>
<th class="border-b border-slate-200 dense-padding text-left bg-indigo-50/50">
<div class="flex flex-col gap-1">
<div class="flex items-center justify-between text-[11px] text-indigo-500">
<span class="font-mono uppercase">Target</span>
<span class="bg-indigo-100 text-indigo-600 px-1 rounded">Y</span>
</div>
<span class="text-sm font-bold text-indigo-900">Yield_Output</span>
<div class="h-4 flex items-end gap-0.5 mt-1">
<div class="bg-indigo-400 w-full h-[100%]"></div>
<div class="bg-indigo-300 w-full h-[80%]"></div>
<div class="bg-indigo-200 w-full h-[50%]"></div>
</div>
</div>
</th>
</tr>
</thead>
<tbody>
<!-- Row 1 -->
<tr class="hover:bg-slate-50 transition-colors cursor-pointer group">
<td class="border-b border-r border-slate-100 dense-padding text-center text-[10px] text-slate-400 font-mono">1</td>
<td class="border-b border-r border-slate-100 dense-padding grid-cell">24.50</td>
<td class="border-b border-r border-slate-100 dense-padding grid-cell">1.02</td>
<td class="border-b border-r border-slate-100 dense-padding text-[12px]">
<span class="bg-slate-100 px-2 py-0.5 rounded text-slate-600">MAC-01</span>
</td>
<td class="border-b border-slate-100 dense-padding grid-cell font-bold bg-indigo-50/20">98.2</td>
</tr>
<!-- Row 2: OUTLIER -->
<tr class="bg-rose-50 transition-colors cursor-pointer group">
<td class="border-b border-r border-rose-100 dense-padding text-center text-[10px] text-rose-400 font-mono">2</td>
<td class="border-b border-r border-rose-100 dense-padding grid-cell">24.52</td>
<td class="border-b border-r border-rose-100 dense-padding grid-cell font-bold text-rose-600 bg-rose-100/50">9.99*</td>
<td class="border-b border-r border-rose-100 dense-padding text-[12px]">
<span class="bg-slate-100 px-2 py-0.5 rounded text-slate-600">MAC-01</span>
</td>
<td class="border-b border-rose-100 dense-padding grid-cell font-bold bg-indigo-50/20 opacity-50">45.1</td>
</tr>
<!-- Row 3 -->
<tr class="hover:bg-slate-50 transition-colors cursor-pointer group">
<td class="border-b border-r border-slate-100 dense-padding text-center text-[10px] text-slate-400 font-mono">3</td>
<td class="border-b border-r border-slate-100 dense-padding grid-cell">24.48</td>
<td class="border-b border-r border-slate-100 dense-padding grid-cell">1.01</td>
<td class="border-b border-r border-slate-100 dense-padding text-[12px]">
<span class="bg-slate-100 px-2 py-0.5 rounded text-slate-600">MAC-02</span>
</td>
<td class="border-b border-slate-100 dense-padding grid-cell font-bold bg-indigo-50/20">97.9</td>
</tr>
<!-- Row 4: LOADING Simulation -->
<tr class="">
<td class="border-b border-r border-slate-100 dense-padding text-center text-[10px] text-slate-400 font-mono">4</td>
<td class="border-b border-r border-slate-100 p-2"><div class="h-4 shimmer rounded w-16"></div></td>
<td class="border-b border-r border-slate-100 p-2"><div class="h-4 shimmer rounded w-16"></div></td>
<td class="border-b border-r border-slate-100 p-2"><div class="h-4 shimmer rounded w-20"></div></td>
<td class="border-b border-slate-100 p-2"><div class="h-4 shimmer rounded w-12"></div></td>
</tr>
</tbody>
</table>
</div>
<!-- Floating Insight Panel (Simulation) -->
<div class="absolute right-6 top-20 w-80 bg-white border border-slate-200 rounded-xl shadow-2xl shadow-indigo-100 overflow-hidden flex flex-col animate-slide-in">
<div class="p-4 bg-indigo-600 text-white flex items-center justify-between">
<h3 class="font-bold flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/></svg>
Smart Insights
</h3>
<button class="opacity-70 hover:opacity-100">&times;</button>
</div>
<div class="p-5 space-y-4">
<div class="space-y-1">
<p class="text-[10px] uppercase font-bold text-slate-400 tracking-tight">Detected Anomalies</p>
<p class="text-sm text-slate-700">Found <span class="font-bold text-rose-600">34 outliers</span> in column <span class="font-mono bg-slate-100 px-1 rounded text-xs">Pressure_Bar</span>.</p>
</div>
<div class="bg-slate-50 border border-slate-100 rounded-lg p-3 space-y-2">
<p class="text-xs text-slate-500 font-medium italic">Why? Values are > 3.5 standard deviations from the mean (9.99 bar vs avg 1.05 bar).</p>
<div class="flex items-center gap-2">
<button class="bg-rose-100 text-rose-700 px-3 py-1.5 rounded text-[11px] font-bold hover:bg-rose-200 transition-colors flex-1">Exclude Data</button>
<button class="bg-white border border-slate-200 text-slate-600 px-3 py-1.5 rounded text-[11px] font-bold hover:bg-slate-50 transition-colors">Ignore</button>
</div>
</div>
<div class="pt-2 border-t border-slate-100">
<p class="text-[10px] uppercase font-bold text-slate-400 tracking-tight mb-2">Impact on Model</p>
<div class="flex items-center justify-between mb-1">
<span class="text-xs text-slate-600 font-medium">R-Squared (Current)</span>
<span class="text-xs font-mono font-bold">0.65</span>
</div>
<div class="flex items-center justify-between">
<span class="text-xs text-slate-600 font-medium">R-Squared (Post-fix)</span>
<span class="text-xs font-mono font-bold text-success">0.82 (+26%)</span>
</div>
</div>
</div>
</div>
<!-- Notification Toast -->
<div class="absolute bottom-6 left-1/2 -translate-x-1/2 bg-slate-900 text-white px-6 py-3 rounded-full shadow-lg flex items-center gap-3 text-sm animate-bounce">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="success" stroke-width="3"><polyline points="20 6 9 17 4 12"/></svg>
Dataset "Production_Jan" loaded with 52,430 rows successfully.
</div>
</main>
</body>
</html>