Create an interactive analytics dashboard for the AI job market right now, highlighting…
- User
Create an interactive analytics dashboard for the AI job market right now, highlighting new jobs, vs layoffs, vs job titles that are trending aimed at a college student researching for a paper. Include KPI summary cards with trend indicators, a mix of line, bar, and donut charts with hover tooltips and smooth transitions, a sortable and filterable data table, and date-range and segment filters that update every view live. Use a clean, modern visual style with clear layout hierarchy and a dark mode toggle, generate realistic sample data so every chart feels alive, and make it fully responsive.
Assistant
I'll create an interactive AI job market analytics dashboard. Let me start by exploring the project structure.
Let me check the remaining config files.
The project uses Tailwind CSS v4, React 19, and TypeScript. Let me check the TypeScript config to understand strictness settings before writing code.
Recharts is installed. Now let me set up the foundation: the CSS with dark mode support, the HTML shell, formatting helpers, and the theme hook.
Foundation is set. Now I'll build the data layer with a seeded generator that produces 2 years of realistic daily market records, individual job postings, and per-title growth trends.
Now the analytics engine that derives all views from the filters — KPIs with period-over-period trends, chart series, title rankings, donut groupings, and narrative insights.
Let me clean up
analytics.ts— I need to move theWEEKSconstant andPOSTINGSimport to the top of the file to avoid any declaration-order issues.Now let me remove the duplicate declarations at the bottom of the file.
Analytics layer is clean. Now I'll create the shared UI building blocks: an icon set, the header, chart card wrapper, custom tooltip, KPI card with sparklines, and the filter bar.
Now the KPI cards with trend chips and sparklines, plus the filter bar with date-range pills and segment selects.
Now the three chart components — the jobs vs layoffs trend (area/line), trending titles (bar), and segment distribution (donut) — all with custom tooltips and smooth animations.
I need to fix the missing import and type the formatter parameter in the bar chart.
Now the interactive donut chart with selectable slices, a hover-active shape, and a clickable legend.
The active shape type needs to use Recharts' own
PieSectorDataItemtype with safe defaults. Let me fix that.Recharts v3 seems to have changed the Pie API. Let me check the installed version's type definitions.
Let me examine the Pie API in Recharts v3 to use the correct props.
Let me check the
PieSectorDatatype to see if the payload is accessible on sector data.Now I'll rewrite the Pie component to use the v3
shapeprop API instead of the removedactiveIndex.The hover state is now handled internally by Recharts v3. Let me clean up the unused state.
The donut chart is fixed. Now the sortable/filterable data table and the insights panel.
Now the main App component that wires everything together with live filter state, the hero strip, and responsive layout.
All components are in place. Let me build the project to verify everything compiles.
The build succeeded. Let me review the analytics module and donut chart to verify correctness after the multiple edits.
Everything looks correct. Let me make a small refinement to the bar chart's category axis width so longer job titles display fully, then do a final build.
The build is successful. The dashboard is complete. Here's a summary of what I built:
AI Job Market Pulse — Interactive Research Dashboard
A fully interactive analytics dashboard for a college student researching the AI job market, with all views wired to shared live filters.
Architecture
src/lib/data.ts— Seeded PRNG generates 2 years of realistic data: 43,800 daily market records (jobs posted vs. layoffs across industry × role × experience), 160 individual job postings, and 104-week demand curves for 17 AI job titles (with industry/experience skews so filters reshape rankings meaningfully).src/lib/analytics.ts— Pure aggregation engine: period-over-period comparisons, daily/weekly bucketed series, title momentum rankings, donut groupings, and auto-generated research insights.src/lib/format.ts— Shared number/date formatters.src/hooks/useTheme.ts+ pre-paint script inindex.html— flicker-free dark mode with system preference detection and localStorage persistence.
Features delivered
- 4 KPI cards with trend chips (arrow + % vs. prior period, color-coded semantics — layoffs dropping is green), animated value pops, and inline SVG sparklines.
- Line/area chart (jobs vs. layoffs + dashed net-demand line), horizontal bar chart (top 8 trending titles, bars colored by momentum with % labels), and donut chart with clickable slices, hover enlargement, and a clickable legend — all with custom dark-mode-aware tooltips and 700ms eased transitions.
- Date-range pills (30D/90D/6M/12M) and Industry / Role / Experience selects that live-update every KPI, chart, insight, and the table — plus a donut axis toggle and slice-click-to-filter with highlight/dim states.
- Sortable, searchable data table with 6 sortable columns, pagination, segment-synced filtering, and CSV export for the student's appendix.
- Research takeaways panel with auto-generated, filter-aware insights, a methodology note, and a suggested citation.
- Fully responsive (1→4 column KPI grid, stacking chart rows, horizontally scrollable table), Inter typography, and a clean light/dark visual system.
The project builds cleanly with
npm run build.Files built:
src/index.css,index.html,src/lib/format.ts,src/hooks/useTheme.ts,src/lib/data.ts,src/lib/analytics.ts,src/components/icons.tsx,src/components/Header.tsx,src/components/ChartCard.tsx,src/components/ChartTooltip.tsx,src/components/KpiCard.tsx,src/components/FilterBar.tsx,src/components/charts/JobsTrendChart.tsx,src/components/charts/TrendingTitlesChart.tsx,src/components/charts/SegmentDonutChart.tsx,src/components/DataTable.tsx,src/components/InsightsPanel.tsx,src/App.tsx
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.