Oireachtas Viz
Parliamentary analytics for the Oireachtas. Attendance, contributions, and voting patterns made visible.
Parliament in Numbers
The Oireachtas publishes everything. Every parliamentary question a TD asks, every vote they cast, every bill introduced and every stage it passes through. It’s all available through an open data API, updated daily, free to access. In theory, any citizen can see exactly what their elected representatives are doing.
In practice, nobody does. The API returns deeply nested JSON. A single parliamentary question comes wrapped in four levels of objects. A division vote lists every TD’s name buried inside arrays of arrays. The data is technically open but practically invisible — you need to be a developer to extract meaning from it, and even then you’re looking at numbers in a terminal, not patterns on a screen.
Oireachtas Viz changes that. It takes the raw API data, flattens it into clean tables, and presents it as seven interactive visualisations — each designed to answer a specific question about how the Oireachtas works. Which departments face the most scrutiny? How disciplined are the parties? Which constituencies are most active? Every chart is drillable — click a bar and see the individual records behind it, with links back to the official Oireachtas source. The data was always public. Now it’s visible.
A Report Card for Parliament
Imagine your school published a list every day of who asked questions in class, who voted on the class rules, and what new rules were proposed. The list is very long and hard to read. Oireachtas Viz takes that list and turns it into colourful charts — you can see at a glance which students ask the most questions, which ones always agree with each other, and which rules got stuck in the suggestion box. Click on any chart and it shows you the actual list underneath, so you can check the details yourself.
From API to Visualisation
1. Extract
A pipeline fetches data from the Oireachtas Open Data API (api.oireachtas.ie/v1/). It walks every endpoint — members, parliamentary questions, divisions, legislation — and pages through the full dataset. The API returns deeply nested JSON; the pipeline flattens it into clean relational tables.
2. Load
Flattened data loads into PostgreSQL. Members, memberships, parliamentary questions, divisions, division votes, constituencies, parties, and bills all become queryable Django models. Incremental updates keep the database current without full re-extraction.
3. Visualise
Seven D3.js visualisations, each with its own API endpoint and drill panel:
- Activity Calendar — GitHub-style heatmap of daily parliamentary activity
- Department Scrutiny — which departments face the most parliamentary questions
- Voting Patterns — close votes and timeline of all divisions
- Party Discipline — cohesion scores per party, rebel highlighting
- Constituency Comparison — per-TD activity ranked by constituency
- New TD Spotlight — first-timers compared to experienced members
- Legislative Pipeline — bill progression funnel and type breakdown
4. Drill
Every chart is clickable. Click a bar, a cell, or a dot and a detail panel slides open showing the individual records — dates, names, parties, and links back to the official Oireachtas source. The visualisation is the summary; the drill is the evidence.
5. Filter
A shared filter bar across all pages lets you narrow by time period (this week, this month, this term, custom range), party, and house (Dáil, Seanad, or both). Charts update dynamically.
Who’s Watching Parliament?
Journalist investigating departmental scrutiny
A reporter covering the Department of Health wants to know which TDs are asking the most questions and what they’re asking about. The Department Scrutiny chart shows Health near the top; clicking it reveals every parliamentary question directed at the department, sorted by date. The reporter filters to the current Oireachtas term and exports the list. Each record links to the official Oireachtas source.
Political researcher studying party cohesion
A university researcher is writing about coalition dynamics. The Party Discipline chart shows cohesion scores for every party — how often members vote together. Clicking a party reveals every division where members split, listing who rebelled and how they voted. The researcher can compare discipline across parties and identify the most independent-minded TDs.
Constituency office tracking local representation
A constituency office wants to show voters what their TDs have been doing. The Constituency Comparison chart ranks constituencies by activity per TD. Clicking their constituency shows each local TD’s question count, vote attendance, and party. The office shares the link in their newsletter.
Civic education
A secondary school teacher uses the Legislative Pipeline chart to explain how a bill becomes law. Students can see how many bills were introduced, how many passed each stage, and how many became Acts. The funnel makes the attrition rate visible. Clicking any stage shows the actual bills at that point.
Under the Bonnet
Data source
Oireachtas Open Data API v1 (api.oireachtas.ie). Published under the Oireachtas PSI Licence (CC-BY compatible). Endpoints for members, questions, divisions, legislation, debates.
Pipeline
Django management commands: extract_members, extract_questions, extract_divisions, extract_legislation, extract_all. JSON flattener converts nested API responses into tabular records. Incremental extraction supported.
Models
Member, Membership, ParliamentaryQuestion, Division, DivisionVote, Constituency, Bill. All queryable via Django ORM with appropriate indices.
API endpoints
Each visualisation has a data endpoint and a drill endpoint: /api/activity/, /api/departments/, /api/voting/, /api/discipline/, /api/constituencies/, /api/new-tds/, /api/pipeline/. All accept filter parameters for date range, party, and house.
Frontend
D3.js v7 for all visualisations. SVG rendering with responsive viewBox. Vanilla JavaScript — no framework. Accessible: ARIA labels, keyboard navigation, semantic HTML. Shared filter state module across all pages.
Architecture
Django backend, PostgreSQL database, D3.js frontend. No build step for JavaScript. Docker deployment (port 8004). Gate middleware for access control.