/* global React */ /* ============================= MPS DIRECTORY ============================= */ function MpsPage({ nav, filter }) { const D = window.PT_DATA; const [q, setQ] = React.useState(''); const [party, setParty] = React.useState(filter?.party || 'all'); const [district, setDistrict] = React.useState('all'); const [sort, setSort] = React.useState('speeches'); const filtered = React.useMemo(() => { let list = [...D.MPS]; if (q) list = list.filter(m => m.name.toLowerCase().includes(q.toLowerCase())); if (party !== 'all') list = list.filter(m => m.party.abbr === party); if (district !== 'all') list = list.filter(m => m.district === district); if (sort === 'speeches') list.sort((a,b) => b.speechCount - a.speechCount); else if (sort === 'name') list.sort((a,b) => a.name.localeCompare(b.name)); else if (sort === 'party') list.sort((a,b) => a.party.abbr.localeCompare(b.party.abbr)); return list; }, [q, party, district, sort]); return (
All {D.STATS.totalMps} sitting members of the 10th Parliament. Filter by party or district, or search by name.
Eighteen flat categories that cover what gets debated in the chamber. Every speech is tagged by AI with one to three topics.
A sitting is one day of parliament. The record below includes everything said on the floor of the House.
| # | Date | Session | Speeches | Activity |
|---|---|---|---|---|
| {String(D.SITTINGS.length - i).padStart(2,'0')} | {fmtDateLong(s.date)} | {s.session} | {s.speechCount} |
|
A party-by-topic heatmap. Each cell shows the share of speeches tagged with that topic that came from MPs of a given party — so you can see who owns each issue.
| Topic | {visibleParties.map(p => (
{p.abbr}
|
))}
|---|---|
|
{e.preventDefault();nav('topic',{slug:topic.slug});}} className="serif" style={{ fontSize: 14, fontWeight: 600 }}>
{topic.short}
{topic.count}
|
{visibleParties.map(p => {
const share = row.values[p.abbr] || 0;
const v = cellValue(topic, p.abbr);
return (
setHover({ topic, party: p, share })}
onMouseLeave={() => setHover(null)}>
{mode === 'share' ? (share > 0.05 ? (share * 100).toFixed(0) : '') : (v > 2 ? v : '')}
|
);
})}