root = Card([header, kpiRow, trendSection, programSection, riskSection, financesSection, housingEventsSection, alumniSection, deptSection, semesterCompare, waitlistSection, actionsSection], "card", "column", "xl")
header = CardHeader("University Overview", "Spring 2025 · All departments")
kpiRow = Card([kpiHeading, kpiTable], "sunk")
kpiHeading = Heading("Key Metrics", "h3")
kpiTable = Table([kpiMetric, kpiValue])
kpiMetric = Col("Metric", ["Total Enrollment", "Acceptance Rate", "Tuition Revenue (FY25)", "Scholarship Budget Used", "Housing Occupancy"])
kpiValue = Col("Value", ["32,450", "41.2%", "$486.3M", "$58.7M / $72M (81%)", "94.6%"])
trendSection = Card([trendHeading, enrollmentChart], "sunk")
trendHeading = Heading("Total Enrollment — 5-Year Trend", "h3")
enrollmentChart = LineChart(["2021", "2022", "2023", "2024", "2025"], [enrollSeries], "natural", "Year", "Students")
enrollSeries = Series("Enrollment", [29500, 30400, 31200, 31800, 32450])
programSection = Card([programHeading, programChart], "sunk")
programHeading = Heading("Applications by Program", "h3")
programChart = HorizontalBarChart(["Computer Science", "Business", "Biology", "Psychology", "Engineering", "English"], [appSeries], "grouped", "Applications", "Program")
appSeries = Series("Applications", [12400, 9800, 7600, 5900, 4800, 2200])
riskSection = Card([riskHeading, riskList], "sunk")
riskHeading = Heading("Students at Academic Risk", "h3")
riskList = ListBlock([riskItem1, riskItem2, riskItem3, riskItem4], "number")
riskItem1 = ListItem("1,240 students below 2.0 GPA", "Priority outreach — 68% are first-year")
riskItem2 = ListItem("312 on academic probation", "Mid-semester check-in scheduled")
riskItem3 = ListItem("89 missing attendance", "Flagged by advising system")
riskItem4 = ListItem("45 at risk of dismissal", "Review board meets Friday")
financesSection = Card([financeHeading, scholarshipProgress, courseLoadHeading, courseTable], "sunk")
financeHeading = Heading("Finances", "h3")
scholarshipProgress = Progress(81, "Scholarship budget used: $58.7M of $72M")
courseLoadHeading = Heading("Course Offering Fill Rate", "h4")
courseTable = Table([courseName, courseFill])
courseName = Col("Course", ["CS 201", "BUS 310", "BIO 150", "PSY 220", "ENG 101"])
courseFill = Col("Fill %", [98, 87, 72, 64, 55])
housingEventsSection = Card([housingHeading, housingChart, eventsHeading, eventsList], "sunk")
housingHeading = Heading("Housing Occupancy", "h3")
housingChart = SingleStackedBarChart(["Occupied", "Available"], [9540, 550])
eventsHeading = Heading("Campus Events This Month", "h4")
eventsList = ListBlock([event1, event2, event3], "image")
event1 = ListItem("Spring Career Fair", "Apr 12 · Student Union", ["https://picsum.photos/seed/careerfair/80/80"])
event2 = ListItem("Research Symposium", "Apr 18 · Science Hall", ["https://picsum.photos/seed/symposium/80/80"])
event3 = ListItem("Alumni Networking Night", "Apr 25 · Alumni Center", ["https://picsum.photos/seed/alumni/80/80"])
alumniSection = Card([alumniHeading, alumniChart], "sunk")
alumniHeading = Heading("Alumni Giving — 4-Year Trend", "h3")
alumniChart = BarChart(["2022", "2023", "2024", "2025"], [alumniSeries], "grouped", "Year", "Donations ($M)")
alumniSeries = Series("Giving", [18.2, 21.5, 24.1, 27.8])
deptSection = Card([deptHeading, deptSelect], "sunk")
deptHeading = Heading("Focus on a Department", "h3")
deptSelect = Select("department", [deptCS, deptBus, deptBio, deptPsy], "Choose a department")
deptCS = SelectItem("cs", "Computer Science")
deptBus = SelectItem("bus", "Business")
deptBio = SelectItem("bio", "Biology")
deptPsy = SelectItem("psy", "Psychology")
semesterCompare = Card([semHeading, semTable], "sunk")
semHeading = Heading("This Semester vs. Last", "h3")
semTable = Table([semMetric, semLast, semCurrent])
semMetric = Col("Metric", ["Enrollment", "Avg GPA", "Course Sections", "Retention Rate"])
semLast = Col("Fall 2024", [31400, 3.21, 2140, "91.2%"])
semCurrent = Col("Spring 2025", [32450, 3.28, 2210, "92.4%"])
waitlistSection = Card([waitlistHeading, waitlistChart], "sunk")
waitlistHeading = Heading("Waitlisted Students per Program", "h3")
waitlistChart = HorizontalBarChart(["Computer Science", "Business", "Biology", "Psychology", "Engineering"], [waitSeries], "grouped", "Waitlisted", "Program")
waitSeries = Series("Waitlist", [410, 265, 180, 95, 60])
actionsSection = Card([actionsHeading, actionButtons], "sunk")
actionsHeading = Heading("Quick Actions", "h3")
actionButtons = Buttons([approveBtn, messageBtn])
approveBtn = Button("Approve New Course")
messageBtn = Button("Message Student Group", null, "secondary")