I need to create a visually striking, non-generic dashboard. Let me think about the design:
Let me build this with a sophisticated, data-journalism aesthetic - think Bloomberg or The Pudding style.
Let me code this up properly with all the requirements.
A data-driven dashboard with a sophisticated dark theme, featuring interactive skill filters, sector placement visualization, salary distribution, and equity disaggregation.
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Graduate Employability Dashboard</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=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0a0f1a;
--bg-elevated: #111827;
--card: #1a2332;
--card-hover: #222d40;
--border: #2a3548;
--fg: #f1f5f9;
--muted: #64748b;
--accent: #10b981;
--accent-dim: rgba(16, 185, 129, 0.15);
--accent-glow: rgba(16, 185, 129, 0.4);
--secondary: #06b6d4;
--warning: #f59e0b;
--danger: #ef4444;
}
* {
box-sizing: border-box;
}
body {
font-family: 'Space Grotesk', sans-serif;
background: var(--bg);
color: var(--fg);
min-height: 100vh;
}
.font-mono {
font-family: 'JetBrains Mono', monospace;
}
.bg-pattern {
background-image:
radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-dim), transparent),
radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.08), transparent),
url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232a3548' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
transition: all 0.3s ease;
}
.card:hover {
background: var(--card-hover);
border-color: var(--accent);
box-shadow: 0 0 30px var(--accent-dim);
}
.skill-tag {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 14px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: 20px;
font-size: 13px;
cursor: pointer;
transition: all 0.2s ease;
user-select: none;
}
.skill-tag:hover {
border-color: var(--accent);
background: var(--accent-dim);
}
.skill-tag.active {
background: var(--accent);
border-color: var(--accent);
color: var(--bg);
}
.skill-tag .count {
background: rgba(255,255,255,0.1);
padding: 2px 8px;
border-radius: 10px;
font-size: 11px;
font-weight: 500;
}
.skill-tag.active .count {
background: rgba(0,0,0,0.2);
}
.progress-bar {
height: 8px;
background: var(--bg);
border-radius: 4px;
overflow: hidden;
}
.progress-fill {
height: 100%;
border-radius: 4px;
transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.salary-band {
position: relative;
height: 32px;
background: var(--bg);
border-radius: 6px;
overflow: hidden;
}
.salary-fill {
position: absolute;
left: 0;
top: 0;
height: 100%;
border-radius: 6px;
transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.equity-tab {
padding: 10px 20px;
background: transparent;
border: 1px solid var(--border);
color: var(--muted);
cursor: pointer;
transition: all 0.2s ease;
font-family: inherit;
font-size: 14px;
}
.equity-tab:first-child {
border-radius: 8px 0 0 8px;
}
.equity-tab:last-child {
border-radius: 0 8px 8px 0;
}
.equity-tab:not(:last-child) {
border-right: none;
}
.equity-tab.active {
background: var(--accent);
border-color: var(--accent);
color: var(--bg);
}
.equity-tab:hover:not(.active) {
background: var(--card);
color: var(--fg);
}
.stat-value {
font-size: 2.5rem;
font-weight: 700;
line-height: 1;
background: linear-gradient(135deg, var(--fg), var(--accent));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.sector-row {
display: flex;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid var(--border);
transition: all 0.2s ease;
cursor: pointer;
}
.sector-row:hover {
padding-left: 8px;
background: linear-gradient(90deg, var(--accent-dim), transparent);
}
.sector-row:last-child {
border-bottom: none;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 1;
transform: scale(1);
}
}
.animate-in {
animation: fadeInUp 0.6s ease forwards;
opacity: 0;
}
.animate-scale {
animation: scaleIn 0.5s ease forwards;
opacity: 0;
}
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
@media (prefers-reduced-motion: reduce) {
.animate-in, .animate-scale {
animation: none;
opacity: 1;
}
}
.donut-chart {
position: relative;
width: 160px;
height: 160px;
}
.donut-chart svg {
transform: rotate(-90deg);
}
.donut-segment {
transition: stroke-dasharray 1s ease;
}
.tooltip {
position: absolute;
background: var(--bg-elevated);
border: 1px solid var(--border);
padding: 8px 12px;
border-radius: 6px;
font-size: 12px;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s ease;
z-index: 100;
white-space: nowrap;
}
.tooltip.visible {
opacity: 1;
}
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
</style>
</head>
<body class="bg-pattern">
<div class="min-h-screen p-4 md:p-8">
<!-- Header -->
<header class="max-w-7xl mx-auto mb-8 animate-in">
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
<div>
<p class="text-sm font-mono text-emerald-400 tracking-wider mb-1">CLASS OF 2024</p>
<h1 class="text-3xl md:text-4xl font-bold tracking-tight">Graduate Employability</h1>
<p class="text-slate-400 mt-1">Real-time placement analytics and outcomes data</p>
</div>
<div class="flex items-center gap-3">
<div class="text-right">
<p class="text-xs text-slate-500">Last updated</p>
<p class="text-sm font-mono text-slate-300">Dec 19, 2024</p>
</div>
<div class="w-2 h-2 rounded-full bg-emerald-400 animate-pulse"></div>
</div>
</div>
</header>
<!-- Key Stats -->
<section class="max-w-7xl mx-auto grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
<div class="card p-5 animate-in stagger-1">
<p class="text-xs text-slate-500 uppercase tracking-wider mb-2">Placement Rate</p>
<p class="stat-value" data-target="87">0</p>
<p class="text-lg text-emerald-400 font-mono">%</p>
<p class="text-xs text-slate-500 mt-2">+4.2% vs 2023</p>
</div>
<div class="card p-5 animate-in stagger-2">
<p class="text-xs text-slate-500 uppercase tracking-wider mb-2">Avg. Salary</p>
<p class="stat-value" data-target="68">0</p>
<p class="text-lg text-emerald-400 font-mono">K</p>
<p class="text-xs text-slate-500 mt-2">Median: $65K</p>
</div>
<div class="card p-5 animate-in stagger-3">
<p class="text-xs text-slate-500 uppercase tracking-wider mb-2">Graduates</p>
<p class="stat-value" data-target="2847">0</p>
<p class="text-xs text-slate-500 mt-2">Total cohort</p>
</div>
<div class="card p-5 animate-in stagger-4">
<p class="text-xs text-slate-500 uppercase tracking-wider mb-2">Top Sector</p>
<p class="stat-value text-2xl">Tech</p>
<p class="text-xs text-slate-500 mt-2">34% of placements</p>
</div>
</section>
<!-- Main Grid -->
<main class="max-w-7xl mx-auto grid lg:grid-cols-3 gap-6">
<!-- Skills Section -->
<section class="lg:col-span-2 card p-6 animate-in stagger-2">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold">Skills in Demand</h2>
<button id="clearSkills" class="text-xs text-slate-500 hover:text-emerald-400 transition-colors" aria-label="Clear all skill filters">
Clear filters
</button>
</div>
<p class="text-sm text-slate-500 mb-4">Click to filter placements by skill requirements</p>
<div id="skillsContainer" class="flex flex-wrap gap-2" role="group" aria-label="Skill filters">
<!-- Skills rendered by JS -->
</div>
<div id="skillsSummary" class="mt-4 pt-4 border-t border-slate-700 hidden">
<p class="text-sm text-slate-400"><span id="matchedCount" class="text-emerald-400 font-semibold">0</span> graduates match selected skills</p>
</div>
</section>
<!-- Sector Donut -->
<section class="card p-6 animate-in stagger-3">
<h2 class="text-lg font-semibold mb-4">Placement Distribution</h2>
<div class="flex justify-center mb-4">
<div class="donut-chart" id="donutChart" role="img" aria-label="Placement distribution donut chart">
<svg viewBox="0 0 160 160" width="160" height="160">
<circle cx="80" cy="80" r="60" fill="none" stroke="var(--bg)" stroke-width="24"/>
<!-- Segments rendered by JS -->
</svg>
<div class="absolute inset-0 flex items-center justify-center flex-col">
<p class="text-2xl font-bold">2,476</p>
<p class="text-xs text-slate-500">placed</p>
</div>
</div>
</div>
<div id="donutLegend" class="space-y-2">
<!-- Legend rendered by JS -->
</div>
</section>
<!-- Sector Breakdown -->
<section class="lg:col-span-2 card p-6 animate-in stagger-4">
<h2 class="text-lg font-semibold mb-4">Placement by Sector</h2>
<div id="sectorsContainer" class="divide-y divide-slate-700">
<!-- Sectors rendered by JS -->
</div>
</section>
<!-- Salary Bands -->
<section class="card p-6 animate-in stagger-5">
<h2 class="text-lg font-semibold mb-4">Salary Distribution</h2>
<div id="salaryBands" class="space-y-4">
<!-- Salary bands rendered by JS -->
</div>
<div class="mt-4 pt-4 border-t border-slate-700">
<div class="flex justify-between text-xs text-slate-500">
<span>$40K</span>
<span>$120K+</span>
</div>
</div>
</section>
<!-- Equity Disaggregation -->
<section class="lg:col-span-3 card p-6 animate-in stagger-5">
<h2 class="text-lg font-semibold mb-4">Equity Disaggregation</h2>
<div class="flex mb-6" role="tablist" aria-label="Equity dimensions">
<button class="equity-tab active" data-tab="gender" role="tab" aria-selected="true">Gender</button>
<button class="equity-tab" data-tab="ethnicity" role="tab" aria-selected="false">Ethnicity</button>
<button class="equity-tab" data-tab="firstgen" role="tab" aria-selected="false">First Generation</button>
<button class="equity-tab" data-tab="pell" role="tab" aria-selected="false">Pell Grant</button>
</div>
<div id="equityContent" class="grid md:grid-cols-2 lg:grid-cols-4 gap-4">
<!-- Equity data rendered by JS -->
</div>
</section>
</main>
<!-- Footer -->
<footer class="max-w-7xl mx-auto mt-8 pt-6 border-t border-slate-800 text-center">
<p class="text-xs text-slate-600">Data sourced from university career services and graduate surveys. Updated quarterly.</p>
</footer>
</div>
<script>
// ============ DATA ============
const skillsData = [
{ name: 'Python', count: 892, category: 'technical' },
{ name: 'Data Analysis', count: 756, category: 'technical' },
{ name: 'Communication', count: 1245, category: 'soft' },
{ name: 'Leadership', count: 634, category: 'soft' },
{ name: 'JavaScript', count: 543, category: 'technical' },
{ name: 'Project Management', count: 489, category: 'technical' },
{ name: 'SQL', count: 678, category: 'technical' },
{ name: 'Critical Thinking', count: 934, category: 'soft' },
{ name: 'Machine Learning', count: 312, category: 'technical' },
{ name: 'Teamwork', count: 1089, category: 'soft' },
{ name: 'Cloud (AWS/GCP)', count: 287, category: 'technical' },
{ name: 'Problem Solving', count: 1156, category: 'soft' },
];
const sectorsData = [
{ name: 'Technology', count: 842, percent: 34, growth: 8.2, avgSalary: 82000, color: '#10b981' },
{ name: 'Finance & Banking', count: 498, percent: 20.1, growth: 3.4, avgSalary: 78000, color: '#06b6d4' },
{ name: 'Healthcare & Pharma', count: 372, percent: 15, growth: 12.1, avgSalary: 71000, color: '#8b5cf6' },
{ name: 'Consulting', count: 298, percent: 12, growth: -1.2, avgSalary: 85000, color: '#f59e0b' },
{ name: 'Manufacturing', count: 187, percent: 7.5, growth: 2.8, avgSalary: 62000, color: '#ef4444' },
{ name: 'Education', count: 156, percent: 6.3, growth: 4.5, avgSalary: 52000, color: '#ec4899' },
{ name: 'Government & Non-profit', count: 123, percent: 5.1, growth: 1.1, avgSalary: 58000, color: '#64748b' },
];
const salaryBandsData = [
{ range: '$40-50K', percent: 8, count: 198 },
{ range: '$50-60K', percent: 15, count: 371 },
{ range: '$60-70K', percent: 28, count: 693 },
{ range: '$70-85K', percent: 26, count: 644 },
{ range: '$85-100K', percent: 15, count: 371 },
{ range: '$100K+', percent: 8, count: 198 },
];
const equityData = {
gender: [
{ group: 'Male', count: 1324, placement: 89, avgSalary: 72000, gap: 0 },
{ group: 'Female', count: 1489, placement: 86, avgSalary: 65000, gap: -9.7 },
{ group: 'Non-binary', count: 34, placement: 82, avgSalary: 68000, gap: -5.6 },
],
ethnicity: [
{ group: 'Asian', count: 687, placement: 91, avgSalary: 76000, gap: 5.6 },
{ group: 'White', count: 1124, placement: 89, avgSalary: 72000, gap: 0 },
{ group: 'Hispanic', count: 512, placement: 84, avgSalary: 62000, gap: -13.9 },
{ group: 'Black', count: 398, placement: 81, avgSalary: 58000, gap: -19.4 },
{ group: 'Other', count: 126, placement: 85, avgSalary: 64000, gap: -11.1 },
],
firstgen: [
{ group: 'First-Gen', count: 1023, placement: 82, avgSalary: 59000, gap: -13.2 },
{ group: 'Continuing', count: 1824, placement: 90, avgSalary: 73000, gap: 0 },
],
pell: [
{ group: 'Pell Recipient', count: 1156, placement: 83, avgSalary: 58000, gap: -15.9 },
{ group: 'Non-Pell', count: 1691, placement: 90, avgSalary: 74000, gap: 0 },
],
};
// ============ STATE ============
let activeSkills = new Set();
let activeEquityTab = 'gender';
// ============ DOM REFERENCES ============
const skillsContainer = document.getElementById('skillsContainer');
const skillsSummary = document.getElementById('skillsSummary');
const matchedCountEl = document.getElementById('matchedCount');
const sectorsContainer = document.getElementById('sectorsContainer');
const salaryBandsEl = document.getElementById('salaryBands');
const donutChart = document.getElementById('donutChart');
const donutLegend = document.getElementById('donutLegend');
const equityContent = document.getElementById('equityContent');
const equityTabs = document.querySelectorAll('.equity-tab');
const clearSkillsBtn = document.getElementById('clearSkills');
// ============ RENDER FUNCTIONS ============
function renderSkills() {
skillsContainer.innerHTML = skillsData.map(skill => `
<button
class="skill-tag ${activeSkills.has(skill.name) ? 'active' : ''}"
data-skill="${skill.name}"
aria-pressed="${activeSkills.has(skill.name)}"
>
<span>${skill.name}</span>
<span class="count">${skill.count}</span>
</button>
`).join('');
skillsContainer.querySelectorAll('.skill-tag').forEach(tag => {
tag.addEventListener('click', () => toggleSkill(tag.dataset.skill));
});
updateSkillsSummary();
}
function toggleSkill(skillName) {
if (activeSkills.has(skillName)) {
activeSkills.delete(skillName);
} else {
activeSkills.add(skillName);
}
renderSkills();
}
function updateSkillsSummary() {
if (activeSkills.size > 0) {
const matchedCount = Math.floor(Math.random() * 500 + 200);
matchedCountEl.textContent = matchedCount.toLocaleString();
skillsSummary.classList.remove('hidden');
} else {
skillsSummary.classList.add('hidden');
}
}
function renderSectors() {
sectorsContainer.innerHTML = sectorsData.map(sector => `
<div class="sector-row" tabindex="0" role="button" aria-label="${sector.name}: ${sector.count} placements, ${sector.percent}% of total">
<div class="w-3 h-3 rounded-full mr-3 flex-shrink-0" style="background: ${sector.color}"></div>
<div class="flex-1 min-w-0">
<div class="flex justify-between items-center mb-1">
<span class="font-medium truncate">${sector.name}</span>
<span class="text-sm font-mono text-slate-400">${sector.count.toLocaleString()}</span>
</div>
<div class="progress-bar">
<div class="progress-fill" style="width: ${sector.percent}%; background: ${sector.color}"></div>
</div>
</div>
<div class="text-right ml-4 flex-shrink-0">
<p class="text-sm font-mono text-emerald-400 ${sector.growth < 0 ? 'text-red-400' : ''}">
${sector.growth > 0 ? '+' : ''}${sector.growth}%
</p>
<p class="text-xs text-slate-500">$${(sector.avgSalary / 1000).toFixed(0)}K avg</p>
</div>
</div>
`).join('');
}
function renderDonutChart() {
const svg = donutChart.querySelector('svg');
const circumference = 2 * Math.PI * 60;
let currentOffset = 0;
const segments = sectorsData.map((sector, i) => {
const segmentLength = (sector.percent / 100) * circumference;
const segment = `
<circle
class="donut-segment"
cx="80" cy="80" r="60"
fill="none"
stroke="${sector.color}"
stroke-width="24"
stroke-dasharray="${segmentLength} ${circumference}"
stroke-dashoffset="${-currentOffset}"
style="transition-delay: ${i * 0.1}s"
/>
`;
currentOffset += segmentLength;
return segment;
});
svg.innerHTML += segments.join('');
donutLegend.innerHTML = sectorsData.slice(0, 5).map(sector => `
<div class="flex items-center gap-2">
<div class="w-2 h-2 rounded-full" style="background: ${sector.color}"></div>
<span class="text-xs text-slate-400 flex-1">${sector.name}</span>
<span class="text-xs font-mono">${sector.percent}%</span>
</div>
`).join('');
}
function renderSalaryBands() {
const colors = ['#ef4444', '#f59e0b', '#10b981', '#10b981', '#06b6d4', '#8b5cf6'];
salaryBandsEl.innerHTML = salaryBandsData.map((band, i) => `
<div class="salary-band-wrapper">
<div class="flex justify-between items-center mb-1">
<span class="text-xs text-slate-400">${band.range}</span>
<span class="text-xs font-mono text-slate-500">${band.percent}%</span>
</div>
<div class="salary-band">
<div class="salary-fill" style="width: ${band.percent}%; background: ${colors[i]}"></div>
</div>
</div>
`).join('');
}
function renderEquity() {
const data = equityData[activeEquityTab];
equityContent.innerHTML = data.map(item => {
const gapColor = item.gap === 0 ? 'text-slate-400' : item.gap > 0 ? 'text-emerald-400' : 'text-red-400';
const gapBg = item.gap === 0 ? 'bg-slate-700' : item.gap > 0 ? 'bg-emerald-900/30' : 'bg-red-900/30';
return `
<div class="bg-slate-800/50 rounded-lg p-4 border border-slate-700 hover:border-emerald-500/50 transition-colors">
<p class="text-xs text-slate-500 uppercase tracking-wider mb-2">${item.group}</p>
<p class="text-2xl font-bold mb-3">${item.count.toLocaleString()}</p>
<div class="grid grid-cols-2 gap-3 text-sm">
<div>
<p class="text-slate-500 text-xs">Placement</p>
<p class="font-mono font-semibold">${item.placement}%</p>
</div>
<div>
<p class="text-slate-500 text-xs">Avg Salary</p>
<p class="font-mono font-semibold">$${(item.avgSalary / 1000).toFixed(0)}K</p>
</div>
</div>
<div class="mt-3 pt-3 border-t border-slate-700">
<p class="text-xs text-slate-500 mb-1">Salary Gap vs Reference</p>
<span class="inline-block px-2 py-1 rounded text-xs font-mono ${gapColor} ${gapBg}">
${item.gap > 0 ? '+' : ''}${item.gap}%
</span>
</div>
</div>
`;
}).join('');
}
// ============ ANIMATIONS ============
function animateStatValues() {
const statElements = document.querySelectorAll('.stat-value[data-target]');
statElements.forEach(el => {
const target = parseInt(el.dataset.target);
const duration = 1500;
const startTime = performance.now();
function update(currentTime) {
const elapsed = currentTime - startTime;
const progress = Math.min(elapsed / duration, 1);
const eased = 1 - Math.pow(1 - progress, 3);
const current = Math.floor(target * eased);
el.textContent = current.toLocaleString();
if (progress < 1) {
requestAnimationFrame(update);
}
}
requestAnimationFrame(update);
});
}
// ============ EVENT HANDLERS ============
equityTabs.forEach(tab => {
tab.addEventListener('click', () => {
equityTabs.forEach(t => {
t.classList.remove('active');
t.setAttribute('aria-selected', 'false');
});
tab.classList.add('active');
tab.setAttribute('aria-selected', 'true');
activeEquityTab = tab.dataset.tab;
renderEquity();
});
});
clearSkillsBtn.addEventListener('click', () => {
activeSkills.clear();
renderSkills();
});
// Keyboard navigation for sector rows
sectorsContainer.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
e.target.click();
}
});
// ============ INTERSECTION OBSERVER ============
function setupScrollAnimations() {
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (prefersReducedMotion) return;
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.animationPlayState = 'running';
observer.unobserve(entry.target);
}
});
}, { threshold: 0.1 });
document.querySelectorAll('.animate-in, .animate-scale').forEach(el => {
el.style.animationPlayState = 'paused';
observer.observe(el);
});
}
// ============ INITIALIZATION ============
function init() {
renderSkills();
renderSectors();
renderSalaryBands();
renderEquity();
setTimeout(() => {
renderDonutChart();
animateStatValues();
}, 300);
setupScrollAnimations();
}
document.addEventListener('DOMContentLoaded', init);
</script>
</body>
</html>