Files
ai-taxonomy-literature-anal…/pages/index.tsx
T

80 lines
3.3 KiB
TypeScript

import type { GetServerSideProps } from 'next';
import Link from 'next/link';
import Layout from '../components/Layout';
import { getConferences, getStats, getTaxonomyTree } from '../lib/queries';
import { Conference, TaxNode } from '../lib/types';
interface Props {
conferences: Conference[];
stats: { papers: number; llm: number };
topics: TaxNode[];
today: string;
}
export const getServerSideProps: GetServerSideProps<Props> = async () => {
const [conferences, stats, tree] = await Promise.all([getConferences(), getStats(), getTaxonomyTree({ llm: true })]);
return {
props: {
conferences,
stats,
topics: tree.filter((t) => t.id !== 'other'),
today: new Date().toISOString().slice(0, 10),
},
};
};
const fmt = (c: Conference) =>
c.start_date ? `${c.start_date}${c.end_date ? ' → ' + c.end_date.slice(5) : ''}` : '—';
function status(c: Conference, today: string) {
if (!c.start_date) return c.location === 'Journal' ? 'journal' : 'past';
const end = c.end_date ?? c.start_date;
return today < c.start_date ? 'upcoming' : today <= end ? 'ongoing' : 'past';
}
export default function Home({ conferences, stats, topics, today }: Props) {
const max = Math.max(...topics.map((t) => t.count), 1);
return (
<Layout>
<h1>LLM Research Survey 2026</h1>
<p className="sub">Accepted papers from 2026 NLP and ML venues, classified into a topic taxonomy.</p>
<div className="cards">
<div className="card"><div className="stat">{stats.papers.toLocaleString()}</div>accepted papers indexed</div>
<div className="card"><div className="stat">{stats.llm.toLocaleString()}</div>LLM / language-model related</div>
<div className="card"><div className="stat">{conferences.filter((c) => c.paper_count > 0).length}/{conferences.length}</div>venues with paper lists available</div>
</div>
<h2>Conferences</h2>
<table>
<thead><tr><th>Venue</th><th>Type</th><th>Dates</th><th>Location</th><th>Status</th><th>Papers</th></tr></thead>
<tbody>
{conferences.map((c) => (
<tr key={c.slug}>
<td>
{c.paper_count > 0 ? <Link href={`/conferences/${c.slug}`}><b>{c.short}</b></Link> : <b>{c.short}</b>}
<div className="sub" style={{ margin: 0, fontSize: 12 }}>{c.name}</div>
</td>
<td><span className={`badge ${c.kind.toLowerCase()}`}>{c.kind}</span></td>
<td>{fmt(c)}</td>
<td>{c.location ?? '—'}</td>
<td>{status(c, today)}</td>
<td>{c.paper_count > 0 ? <Link href={`/papers?conf=${c.slug}`}>{c.paper_count.toLocaleString()}</Link> : <span className="sub">not yet available</span>}</td>
</tr>
))}
</tbody>
</table>
<h2>LLM topics (LLM-related papers)</h2>
<div className="card">
{topics.map((t) => (
<div key={t.id} style={{ margin: '8px 0' }}>
<Link href={`/papers?node=${t.id}&llm=1`}>{t.label}</Link> <span className="sub">{t.count.toLocaleString()}</span>
<div className="bar" style={{ width: `${(t.count / max) * 100}%` }} />
</div>
))}
<Link href="/landscape#taxonomy">Explore the full taxonomy tree →</Link>
</div>
</Layout>
);
}