hansard / README.md
srehaag's picture
Weekly dataset update — coverage as of 2026-07-05
9844f76 verified
|
Raw
History Blame Contribute Delete
7.22 kB
metadata
license: mit
language:
  - en
pretty_name: Canadian Hansard (A2AJ)
tags:
  - legal
  - law
  - legislation
  - hansard
  - parliament
  - canada
  - politics
  - legal-research
  - computational-social-science
size_categories:
  - 1M<n<10M
configs:
  - config_name: ontario
    data_files:
      - split: train
        path: ontario/train.parquet

Canadian Hansard (A2AJ)

Alpha — work in progress. This is an alpha version of a work in progress academic research project. It is likely to undergo significant revisions.

Last updated: 2026-07-05

Maintainer: Access to Algorithmic Justice (A2AJ)

Dataset Summary

The A2AJ Canadian Hansard dataset provides bulk, open-access parliamentary Hansard transcripts — the official record of debate — for Canadian legislatures, parsed into structured rows with one row per intervention (a speaker turn or a procedural note). It currently covers the Legislative Assembly of Ontario.

The dataset is built for computational legal and political research: programmatically searching the parliamentary record for patterns; tracking how debate, policy, and language evolve over time and in response to case law and policy developments; assembling evidence about the purpose and intent behind legislation and regulations for statutory interpretation; and linking parliamentary discussion to legislation and case law. It is also intended to support legal-tech prototyping and language-model research in the public interest — especially work that advances access to justice for marginalised and low-income communities.

A2AJ is a research project co-hosted by York University's Osgoode Hall Law School and Toronto Metropolitan University's Lincoln Alexander School of Law.

Dataset Structure

Jurisdiction Rows Sitting days Date range Languages
Ontario — Legislative Assembly 1,347,812 4,474 1974-03-05 → 2026-06-02 en
Total 1,347,812

Counts are approximate and will drift as the dataset is updated.

Data Fields

One row per intervention (a speaker turn or a procedural note).

Field Type Description
ID string Stable per-row identifier (sitting date + sequence number).
Date string Sitting date (YYYY-MM-DD).
jurisdiction string Which legislature (e.g. ontario).
chamber string Chamber within the legislature (e.g. legislative_assembly).
language string Language of the source page (e.g. en).
OrderofBusiness string High-level section heading (the order of business).
SubjectofBusiness string Specific topic / matter within the order of business.
PersonSpeaking string Speaker label, or empty for procedural rows.
intervention_type string speech (a speaker turn) or procedural (a procedural note).
Intervention string The text of the intervention.
upstream_license string License / attribution terms from the source legislature.
source_url string The day-page URL this row was parsed from.

Missing values are represented as empty strings or nulls; in particular PersonSpeaking is empty for procedural rows.

Data Languages

Where available, rows record the language of the source page. Coverage is currently English; bilingual jurisdictions may add French in future.

Data Splits

All rows for a jurisdiction are provided in a single train split.

Data Loading

Each jurisdiction is a separate config (ontario), each with a single train split.

from datasets import load_dataset

# load one jurisdiction
rows = load_dataset("a2aj/hansard", "ontario", split="train")
df = rows.to_pandas()
df.head()

The dataset is also offered in Parquet format for fast local use. Files are in subfolders named after each jurisdiction:

import pandas as pd

df = pd.read_parquet("hf://datasets/a2aj/hansard/ontario/train.parquet")

A worked example notebook is available: accessing the data.

Dataset Creation

Curation Rationale

Building on A2AJ's broader open legal-data programme, we collect and share the Canadian parliamentary record to democratise access to it, to enable large-scale empirical research, and to support responsible AI development for the justice and democratic sectors. We scrape data only where permitted by the terms of service of the websites that host it.

Source Data & Normalisation

Transcripts are scraped from the official legislature websites and parsed from HTML into structured rows. Text is stored with minimal normalisation (HTML → plain text, whitespace cleanup). Headings are mapped to OrderofBusiness / SubjectofBusiness, and each speaker turn or procedural note becomes one row.

Non-Official Versions & Disclaimer

The texts here are unofficial copies. For authoritative versions, consult the source URL in source_url.

Non-Affiliation / Endorsement

A2AJ and the production of this dataset are not affiliated with, nor endorsed by, the listed legislatures or governments.

Considerations for Using the Data

  • Social Impact. Open parliamentary data reduces information asymmetries but can also be misused. We encourage downstream users to ensure derivative tools advance — rather than undermine — access to justice and democratic accountability.
  • Bias & Representativeness. Hansard reflects what was said in the chamber under particular editorial and procedural conventions; it is not a neutral or complete record of all political activity.
  • Limitations. Parsing is automated and approximate. HTML formats differ across parliaments, the speech / procedural classification is heuristic, and attached PDFs are not parsed (only the HTML record). Verify against the official source before relying on any row.

Licensing Information

The code used to create the dataset by the A2AJ and any work on the dataset undertaken by the A2AJ is subject to an open source MIT license.

Users must also comply with upstream licenses found in the upstream_license field in the dataset for each document, which reflects the licenses through which the A2AJ obtained the document. These upstream licenses may include limits on commercial use, as well as other limitations.

The A2AJ is committed to open source methodologies, and we are actively working to obtain more permissive licenses for this data.

Warranties / Representations

While we make best efforts to ensure the completeness and accuracy of the dataset, we provide no warranties regarding completeness or accuracy. The data were collected through automated processes and may contain errors. Always verify data against the official source.

Dataset Curators

Acknowledgements

This research output is supported in part by funding from the Law Foundation of Ontario and the Social Sciences and Humanities Research Council of Canada, by in-kind compute from the Digital Research Alliance of Canada and by administrative support from the Centre for Refugee Studies, the Refugee Law Lab, and Osgoode Hall Law School.