CoolFace
Datasetpublic

a2aj/canadian-laws

A2AJ Canadian Laws Last updated: 2026-09-19 Maintainer: Access to Algorithmic Justice (A2AJ) Dataset Summary The A2AJ Canadian Laws dataset provides bulk, open-access full-text legislation and regulations from Canada, covering the federal jurisdiction and twelve provinces and territories. Each row corresponds to a single law or regulation and contains the English and French versions where both are publicly available. The project builds on an earlier version that… See the full description on the dataset page: https://huggingface.co/datasets/a2aj/canadian-laws.

sourceHugging Facemitupdated 3d agoView on Hugging Face
12likes940downloads
Dataset Card

A2AJ Canadian Laws

Last updated: 2026-09-19 Maintainer: Access to Algorithmic Justice (A2AJ)


Dataset Summary

The A2AJ Canadian Laws dataset provides bulk, open-access full-text legislation and regulations from Canada, covering the federal jurisdiction and twelve provinces and territories. Each row corresponds to a single law or regulation and contains the English and French versions where both are publicly available. The project builds on an earlier version that was maintained by the Refugee Law Lab (RLL) and is now maintained by **A2AJ**, a research project co-hosted by York University's Osgoode Hall Law School and Toronto Metropolitan University's Lincoln Alexander School of Law. The dataset is intended to support empirical legal research, legal-tech prototyping, and language-model pre-training in the public interest—especially work that advances access to justice for marginalised and low-income communities.


Dataset Structure (~ 26k documents)

CodeTypeFirst document – Last documentRows
LEGISLATION-FEDFederal Statutes1870-05-12 – 2026-06-18969
REGULATIONS-FEDFederal Regulations1945-12-21 – 2026-07-294,886
LEGISLATION-ONOntario Legislation1986-07-28 – 2026-09-15856
REGULATIONS-ONOntario Regulations1990-12-31 – 2026-09-162,217
LEGISLATION-BCBritish Columbia Legislation1924-12-19 – 2026-05-28574
REGULATIONS-BCBritish Columbia Regulations1968-01-01 – 2026-09-081,474
LEGISLATION-ABAlberta Legislation2002-01-01 – 2026-07-31442
REGULATIONS-ABAlberta Regulations1969-02-11 – 2026-09-01921
LEGISLATION-NSNova Scotia Legislation1900-01-01 – 2026-08-05624
REGULATIONS-NSNova Scotia Regulations1913-09-08 – 2026-09-011,506
LEGISLATION-YTYukon Legislation2000-01-01 – 2026-01-01278
REGULATIONS-YTYukon Regulations1957-08-01 – 2027-03-011,355
LEGISLATION-MBManitoba Legislation1985-06-26 – 2026-06-01515
REGULATIONS-MBManitoba Regulations1972-09-27 – 2026-09-111,091
LEGISLATION-NBNew Brunswick Legislation1973-01-01 – 2026-06-12422
REGULATIONS-NBNew Brunswick Regulations1980-10-30 – 2026-09-15676
LEGISLATION-NLNewfoundland and Labrador Legislation1957-06-12 – 2025-03-18403
REGULATIONS-NLNewfoundland and Labrador Regulations1986-01-01 – 2026-08-271,664
LEGISLATION-NTNorthwest Territories Legislation1988-01-01 – 2024-01-01239
REGULATIONS-NTNorthwest Territories Regulations1990-01-01 – 2026-08-21563
LEGISLATION-SKSaskatchewan Legislation1954-12-20 – 2026-08-28506
REGULATIONS-SKSaskatchewan Regulations1943-12-06 – 2026-08-28667
LEGISLATION-PEPrince Edward Island Legislation2003-11-01 – 2026-07-11341
REGULATIONS-PEPrince Edward Island Regulations2002-12-31 – 2026-08-08396
LEGISLATION-QCQuebec Legislation1992-06-23 – 2026-07-01542
REGULATIONS-QCQuebec Regulations2012-09-01 – 2026-09-012,542
Note: Counts are approximate and will drift as the dataset is updated.

Data Fields

FieldTypeDescription
datasetstringType identifier (eg. LEGISLATION-FED, REGULATIONS-ON)
citation_en / citation_frstringPrimary citation in English / French
citation2_en / citation2_frstringSecondary citation(s) where available
name_en / name_frstringTitle of the law or regulation
document_date_en / document_date_frdatetime64[us, UTC]Date of the document (assent / registration; consolidation currency date for Quebec)
source_url_en / source_url_frstringURL of the official source document
scraped_timestamp_en / scraped_timestamp_frdatetime64[us, UTC]Timestamp when the source was scraped
unofficial_text_en / unofficial_text_frstringFull unofficial text of the law/regulation (Markdown)
unofficial_sections_en / unofficial_sections_frstringJSON string mapping section numbers to section text
num_sections_en / num_sections_frint64Number of sections (key count of unofficial_sections)
upstream_licensestringLicense of the upstream source

Missing values are null (federal regulations use an empty string "" for citation2_en / citation2_fr by convention).

Data Languages

Where available, rows include both English and French texts. Federal, Quebec, Manitoba, New Brunswick, Northwest Territories and Yukon instruments are generally fully bilingual (a minority of Quebec regulations are published in French only); Ontario is partially bilingual; the remaining jurisdictions publish mostly in English. Where only one language is published, the fields for the other language are empty.

Data Splits

All rows are provided in a single train split.


Data Loading

python
from datasets import load_dataset
import pandas as pd

# load specific type of laws (e.g. Federal Legislation)
laws = load_dataset("a2aj/canadian-laws", data_dir = "LEGISLATION-FED", split="train")

## ALTERNATIVELY
## load the entire corpus
# laws = load_dataset("a2aj/canadian-laws", split="train")

# convert to df
df = laws.to_pandas()
df.head(5)

The dataset is also offered in Parquet format for fast local use. Files are in subfolders with the dataset type names.


Dataset Creation

Curation Rationale

Building on open government initiatives, A2AJ is collecting and sharing Canadian legal data to:

  • democratise access to Canadian legislation and regulations;
  • enable large-scale empirical legal studies; and
  • support responsible AI development for the justice sector.

Source Data & Normalisation

Documents are collected from official government sources for each jurisdiction:

Source documents (XML, HTML or PDF depending on the jurisdiction) are parsed and normalised into a common structure with minimal processing: conversion to Markdown text, cleanup, and section parsing.

Personal & Sensitive Information

Legislation and regulations are public documents that do not typically include personal or sensitive information.

Non-Official Versions & Disclaimer

The texts here are unofficial copies derived from online sources. For authoritative versions, consult the URLs in source_url_en / source_url_fr.

Non-Affiliation / Endorsement

A2AJ and this dataset are not affiliated with, nor endorsed by, the Government of Canada, Justice Canada or any provincial or territorial government.


Considerations for Using the Data

  • Social Impact. Open legal data can reduce information asymmetries but should be used responsibly to ensure that derivative tools advance—rather than undermine—access to justice.
  • Currency. Laws and regulations are living documents that change over time. This dataset represents a snapshot and may not reflect the most current versions. Always verify against official sources for legal purposes.
  • Completeness. The dataset covers the federal jurisdiction plus Ontario, Quebec, British Columbia, Alberta, Nova Scotia, Yukon, Manitoba, New Brunswick, Newfoundland and Labrador, Saskatchewan, the Northwest Territories and Prince Edward Island. Quebec is reproduced from the provincial open-data XML under CC BY-NC-ND 4.0 — note the non-commercial and no-derivatives terms passed through in upstream_license; A2AJ is advocating with the source maintainers for a more permissive licence. Quebec coverage is current consolidations only (repealed/revoked instruments in the source corpus are excluded). Nunavut is not yet included because it imposes copyright / licensing limitations on its legislation; A2AJ plans to seek permission to add it.

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 all data we collect.


Warranties / Representations

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


Dataset Curators


Citation

Sean Rehaag, Simon Wallace & Clifford McCarten, "A2AJ Canadian Laws" (2025), online: Hugging Face Datasets https://huggingface.co/datasets/a2aj/canadian-laws (updated 2026).

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. We also thank Justice Canada and the provincial and territorial publishers for maintaining open access to legislative source documents.