# Training Platform Analytics

<Card title="Cohort Filter" subtitle="Select a cohort to narrow all metrics">
<Select label="Cohort" placeholder="All cohorts" options="All cohorts | Cohort A - Q1 2024 | Cohort B - Q1 2024 | Cohort C - Q2 2024 | Cohort D - Q2 2024" />
</Card>

<Columns>
<Card title="Active Learners This Week">
<Stat label="Active Learners" value="1,247" change="+12% vs last week" tone="success" icon="users" />
</Card>

<Card title="Course Completion Rate">
<Stat label="Completion Rate" value="78.4%" change="+3.2pp vs last month" tone="info" icon="chart-line" />
</Card>

<Card title="Average Quiz Score">
<Stat label="Avg Quiz Score" value="84.7%" change="-1.1pp vs last week" tone="warning" icon="chart-line" />
</Card>
</Columns>

<Card title="Engagement Across Past 8 Weeks" subtitle="Weekly active learners and session duration">
<Chart type="line" x="Week" y="Value">
| Week | Active Learners | Avg Session (min) |
|---|---|---|
| W1 | 980 | 42 |
| W2 | 1050 | 45 |
| W3 | 1120 | 48 |
| W4 | 1180 | 51 |
| W5 | 1150 | 49 |
| W6 | 1210 | 53 |
| W7 | 1190 | 52 |
| W8 | 1247 | 55 |
</Chart>
</Card>

<Card title="Courses Ranked by Enrollment">
<Chart type="horizontal" x="Enrollment" y="Course">
| Course | Enrollment |
|---|---|
| Python Fundamentals | 482 |
| Data Analysis with Pandas | 356 |
| Web Development Bootcamp | 298 |
| Machine Learning Basics | 245 |
| SQL for Analytics | 187 |
| React Advanced Patterns | 156 |
| DevOps Essentials | 134 |
| Cloud Architecture | 98 |
</Chart>
</Card>

<Card title="Learners at Risk of Dropping Out" subtitle="Identified by <7 days since last login and <50% course progress">
<Details title="View all 23 at-risk learners" open="false">
| Learner | Cohort | Course | Last Login | Progress | Risk Level |
|---|---|---|---|---|---|
| Sarah Chen | Cohort B | Python Fundamentals | 12 days ago | 34% | <Badge tone="danger">High</Badge> |
| Marcus Johnson | Cohort A | Data Analysis | 9 days ago | 41% | <Badge tone="danger">High</Badge> |
| Priya Patel | Cohort C | Web Dev Bootcamp | 8 days ago | 28% | <Badge tone="danger">High</Badge> |
| James Wilson | Cohort B | ML Basics | 10 days ago | 38% | <Badge tone="warning">Medium</Badge> |
| Lisa Zhang | Cohort D | SQL Analytics | 7 days ago | 45% | <Badge tone="warning">Medium</Badge> |
| David Kim | Cohort A | React Advanced | 11 days ago | 31% | <Badge tone="danger">High</Badge> |
| Emily Davis | Cohort C | DevOps Essentials | 9 days ago | 42% | <Badge tone="warning">Medium</Badge> |
| Robert Brown | Cohort B | Cloud Architecture | 13 days ago | 26% | <Badge tone="danger">High</Badge> |
</Details>
</Card>

<Card title="Message a Cohort" subtitle="Send a targeted message to learners in a specific cohort">
<Form name="cohort-message">
<Select label="Target Cohort" placeholder="Select cohort" options="Cohort A - Q1 2024 | Cohort B - Q1 2024 | Cohort C - Q2 2024 | Cohort D - Q2 2024" required="true" />
<Input label="Subject" placeholder="e.g., Mid-course check-in" required="true" />
<TextArea label="Message" placeholder="Write your message here... Use {{name}} for personalization." rows="6" required="true" hint="Supports basic markdown. Learners will receive this via email and in-app notification." />
<Columns>
<Button variant="primary">Send Message</Button>
<Button variant="secondary">Save as Draft</Button>
<Button variant="tertiary">Preview</Button>
</Columns>
</Form>
</Card>

<FollowUps>
- Show me completion rates by course
- Export at-risk learner list to CSV
- Compare cohort performance side-by-side
- Set up automated nudges for inactive learners
</FollowUps>