Dataset Viewer

The dataset viewer should be available soon. Please retry later.

World National Law

National, first-level subnational and supranational law worldwide (statutes, regulations, gazettes, codes), normalized to the same schema as world_municipal_law.

Relation to world_municipal_law

This repo holds national, first-level subnational (state / Land / province / région) and supranational law, i.e. places whose place_id is iso:{CC}, iso:{ISO 3166-2} or iso:EU (place_key iso_*, admin_level country / adm1 / supranational). Municipal and other local law (municipalities, counties, water boards, …) is in endomorphosis/world_municipal_law, with the same schema and layout. The data was split out of world_municipal_law on 2026-10-11 (copied, verified by sha256 and row counts, then deleted there in a later commit); both repos are now updated by the same pipeline run.

Layout

  • world_law/data/{CC}/{place_key}_html.parquet: one file per jurisdiction (ZSTD); large places are sharded as {place_key}.s0001_html.parquet, .s0002_… (≤20k rows / ~200 MB each)
  • world_law/metadata/{CC}/{place_key}.json
  • Countries with more than 5,000 places (none in this repo) are hash-bucketed, because the Hub allows at most 10,000 files per folder: world_law/data/{CC}/{b}/{place_key}_html.parquet and world_law/metadata/{CC}/{b}/{place_key}.json, where b = first 2 hex characters of sha256(place_key) (256 buckets). places.parquet always holds each place's exact html_path.
  • world_law/manifests/*.jsonl: per-upload manifests with sha256
  • world_law/places.parquet: crosswalk of place_id, Wikidata QID, GNIS and platform ids

place_key is the GNIS for US places, otherwise place_id with : replaced by _ (iso_FR = France national law, iso_US-CA = California state law, iso_EU = EU law).

Columns (*_html.parquet)

cid, doc_id, doc_order, html_title, html (same as american_municipal_law), then place_id, country_code, gnis, source_platform, source_url, doc_type, language, title_native, number, adopted_date, published_date, effective_date, in_force, consolidated, content_format, text, retrieved_at, then optional provenance (v1.1.0): archive_source, archive_crawl_id, archive_timestamp, archive_url, original_url, content_complete, possibly_stale, source_policy, source_official, source_org, license_note, extra_metadata (JSON string of other source fields), then (v1.2.0) pdf_ref: for documents whose source is an image-only scanned PDF, the PDF in endomorphosis/world_law_scanned_pdfs as endomorphosis/world_law_scanned_pdfs:pdfs/<CC>/[<b>/]<place_key>/<sha256>.pdf (loose file) or, for PDFs uploaded since 2026-10-18, endomorphosis/world_law_scanned_pdfs:shards/<CC>/<YYYY>/<MM>/<CC>_<seq>.tar#member=<place_key>/<sha256>.pdf&offset=<o>&size=<n>&sha256=<h> (one member of a per-country tar shard, fetchable with one HTTP Range request); null otherwise. Files written before v1.2.0 have no pdf_ref column — treat it as null. world_law_loader.fetch_pdf(row) downloads either form (fetch_pdf_bytes returns the bytes) and checks the sha256. Access: world_law_scanned_pdfs is a private dataset, so resolving a pdf_ref needs a Hugging Face token that is authorized for it (set HF_TOKEN, or pass token= to the loader). The text, metadata and every other column in this dataset are public and need no token.

Related datasets: world_municipal_law (local places) · world_national_law (iso:* places) · world_law_scanned_pdfs (scanned source PDFs) · code: world_law_pipeline. content_complete=false marks metadata-only / partial records.

doc_type ∈ code_section | ordinance | regulation | statute | gazette_act | decision. consolidated=false marks as-published gazette acts.

cid = IPFS CIDv1 (raw, sha2-256, base32) of {place_key}_{doc_id}.json, which is identical to american_municipal_law for US places.

Provenance

  • Documents: 1,671,575 in 681 places.
  • From a web archive (Wayback / Common Crawl; archive_source set): 18,580 (1.1%).
  • Of those, archived copies of sites whose robots.txt disallows crawling or whose pages carry a robots noarchive/noindex meta tag (source_policy = archived_robots_disallowed / noarchive_meta / noindex_meta): 16,552.
  • content_complete = false (metadata-only or partial text): 10,357.
  • source_official = false (non-government mirror/aggregator): 609.
  • Rows whose live fetch was not permitted (robots.txt unreachable or disallowing) are not published.
country places docs archived archived share archived (restricted sites) content_complete=false source_official=false
AE 1 1 0 0.0% 0 0 0
AF 1 87 0 0.0% 0 0 0
AG 1 3,265 0 0.0% 0 0 0
AI 1 617 0 0.0% 0 0 0
AL 1 8,084 0 0.0% 0 0 0
AM 1 6 0 0.0% 0 0 0
AO 1 6,137 0 0.0% 0 0 0
AR 8 17,934 0 0.0% 0 0 0
AT 10 304 304 100.0% 280 0 0
AU 5 4,296 14 0.3% 14 0 0
AW 1 7 0 0.0% 0 0 0
AZ 1 203 0 0.0% 0 0 0
BA 4 2,010 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1 670 0 0.0% 0 0 0
FR 2 3,540 3 0.1% 0 3 0
GA 1 115 0 0.0% 0 0 0
GB 1 156,128 0 0.0% 0 0 0
GD 1 1 0 0.0% 0 0 0
GE 1 158 0 0.0% 0 0 0
GH 1 1 0 0.0% 0 0 0
GM 1 121 0 0.0% 0 0 0
GN 1 130 0 0.0% 0 0 0
GQ 1 132 0 0.0% 0 0 0
GR 1 232 0 0.0% 0 0 0
GT 1 2,412 0 0.0% 0 0 0
GW 1 202 0 0.0% 0 0 0
GY 1 206 0 0.0% 0 0 0
HK 1 2,258 0 0.0% 0 0 0
HN 1 209 0 0.0% 0 0 0
HR 1 30,315 0 0.0% 0 0 0
HT 1 151 0 0.0% 0 0 0
HU 1 380 0 0.0% 0 0 0
ID 31 147 147 100.0% 84 44 0
IE 1 50 0 0.0% 0 0 0
IL 1 995 0 0.0% 0 0 0
IN 14 1,002 21 2.1% 21 7 0
IQ 2 174 0 0.0% 0 0 0
IR 1 10 10 100.0% 0 0 0
IS 1 3 0 0.0% 0 0 0
IT 11 218,771 0 0.0% 0 0 0
JM 1 2 0 0.0% 0 0 0
JO 1 10 0 0.0% 0 0 0
JP 25 27,220 27 0.1% 0 0 0
KE 46 619 12 1.9% 0 9 0
KG 1 1 0 0.0% 0 0 0
KH 4 62 0 0.0% 0 25 25
KI 1 168 0 0.0% 0 0 0
KM 1 124 0 0.0% 0 0 0
KN 1 150 0 0.0% 0 0 0
KR 10 5,766 107 1.9% 107 0 0
KW 1 202 0 0.0% 0 0 0
KY 1 175 0 0.0% 0 0 0
KZ 16 3,022 3,022 100.0% 3,022 0 0
LA 2 6,421 0 0.0% 0 0 1
LB 1 370 0 0.0% 0 0 0
LC 1 5 0 0.0% 0 0 0
LK 1 1 0 0.0% 0 0 0
LR 1 191 0 0.0% 0 0 0
LS 1 107 0 0.0% 0 0 0
LT 1 7,492 0 0.0% 0 0 0
LU 1 1,353 0 0.0% 0 0 0
LV 1 429 0 0.0% 0 0 0
LY 1 3 0 0.0% 0 0 0
MA 1 2 0 0.0% 0 0 0
MD 1 402 0 0.0% 0 0 0
ME 1 38 0 0.0% 0 0 0
MG 1 280 0 0.0% 0 0 0
MH 1 884 0 0.0% 0 0 0
MK 1 11,017 0 0.0% 0 0 0
ML 1 3 0 0.0% 0 0 0
MM 13 767 0 0.0% 0 26 27
MN 23 1,264 0 0.0% 0 0 0
MO 1 419 419 100.0% 419 0 0
MR 1 293 0 0.0% 0 0 0
MS 1 1,464 0 0.0% 0 0 0
MT 1 74 0 0.0% 0 0 0
MU 1 158 0 0.0% 0 0 0
MV 1 2,535 0 0.0% 0 0 0
MW 1 5,361 0 0.0% 0 0 0
MX 29 1,396 1,396 100.0% 22 0 0
MY 2 65 0 0.0% 0 0 0
MZ 1 294 0 0.0% 0 0 0
NA 1 530 0 0.0% 0 0 0
NE 1 115 0 0.0% 0 0 0
NG 1 566 0 0.0% 0 0 556
NI 1 353 0 0.0% 0 0 0
NL 13 4,074 0 0.0% 0 0 0
NO 1 32 0 0.0% 0 0 0
NP 1 18 0 0.0% 0 0 0
NR 1 3 0 0.0% 0 0 0
NU 1 3 0 0.0% 0 0 0
NZ 1 142 0 0.0% 0 0 0
OM 1 1,679 0 0.0% 0 0 0
PA 1 425 0 0.0% 0 0 0
PE 1 416 416 100.0% 416 0 0
PG 1 113 0 0.0% 0 0 0
PH 1 95 95 100.0% 0 0 0
PK 3 3,295 0 0.0% 0 224 0
PL 17 57,669 199 0.3% 0 0 0
PR 1 9 0 0.0% 0 0 0
PS 1 3,178 0 0.0% 0 0 0
PT 1 9,942 0 0.0% 0 0 0
PW 1 107 0 0.0% 0 0 0
PY 1 3 0 0.0% 0 0 0
QA 1 2,856 0 0.0% 0 0 0
RO 4 82,361 0 0.0% 0 74 0
RS 1 381 0 0.0% 0 0 0
RU 37 8,988 8,988 100.0% 8,983 8,532 0
RW 1 3 0 0.0% 0 0 0
SA 1 646 0 0.0% 0 0 0
SB 1 3 0 0.0% 0 0 0
SC 1 170 0 0.0% 0 0 0
SD 1 1 0 0.0% 0 0 0
SE 1 10 0 0.0% 0 0 0
SG 1 128 0 0.0% 0 0 0
SI 1 236,538 0 0.0% 0 0 0
SK 1 24 0 0.0% 0 0 0
SL 1 256 0 0.0% 0 0 0
SN 1 2 0 0.0% 0 0 0
SO 1 29 0 0.0% 0 0 0
SR 1 99 0 0.0% 0 0 0
SS 1 99 0 0.0% 0 0 0
ST 1 116 0 0.0% 0 0 0
SV 1 325 0 0.0% 0 0 0
SX 1 1,022 0 0.0% 0 0 0
SY 1 3 0 0.0% 0 0 0
SZ 1 169 0 0.0% 0 0 0
TC 1 178 0 0.0% 0 0 0
TD 1 79 0 0.0% 0 0 0
TG 1 194 0 0.0% 0 0 0
TH 1 29 29 100.0% 0 0 0
TJ 1 98 0 0.0% 0 0 0
TL 1 287 0 0.0% 0 0 0
TM 1 11 0 0.0% 0 0 0
TN 1 2 0 0.0% 0 0 0
TO 1 687 0 0.0% 0 0 0
TR 1 5,297 0 0.0% 0 0 0
TT 1 488 0 0.0% 0 0 0
TV 1 289 0 0.0% 0 0 0
TW 1 14,966 0 0.0% 0 0 0
TZ 1 750 0 0.0% 0 0 0
UA 1 7,586 0 0.0% 0 0 0
UG 1 269 0 0.0% 0 0 0
US 52 502,862 108 0.0% 0 0 0
UY 1 11 0 0.0% 0 0 0
UZ 1 5,253 0 0.0% 0 0 0
VC 1 136 0 0.0% 0 0 0
VE 1 205 0 0.0% 0 0 0
VG 1 1 0 0.0% 0 0 0
VN 53 1,405 1,395 99.3% 1,375 0 0
VU 1 3 0 0.0% 0 0 0
WS 1 3 0 0.0% 0 0 0
XK 1 1 0 0.0% 0 0 0
YE 1 342 0 0.0% 0 0 0
ZA 3 56 0 0.0% 0 0 0
ZM 1 5,444 0 0.0% 0 0 0
ZW 1 1 0 0.0% 0 0 0

Configs

default covers every country; there is also one config per ISO 3166-1 country code (AE, AF, AG, AI, AL, AM, AO, AR, AT, AU, AW, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BM, BN, BO, BR, BS, BT, BW, BY, BZ, CA, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, ES, ET, EU, FI, FJ, FM, FR, GA, GB, GD, GE, GH, GM, GN, GQ, GR, GT, GW, GY, HK, HN, HR, HT, HU, ID, IE, IL, IN, IQ, IR, IS, IT, JM, JO, JP, KE, KG, KH, KI, KM, KN, KR, KW, KY, KZ, LA, LB, LC, LK, LR, LS, LT, LU, LV, LY, MA, MD, ME, MG, MH, MK, ML, MM, MN, MO, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NE, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PG, PH, PK, PL, PR, PS, PT, PW, PY, QA, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SI, SK, SL, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TG, TH, TJ, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, US, UY, UZ, VC, VE, VG, VN, VU, WS, XK, YE, ZA, ZM, ZW). A country config can show as empty until its first files are uploaded.

Code

The scrapers, normalizer/uploader, schema and place-code crosswalk that build this dataset are published at endomorphosis/world_law_pipeline. Rows whose live fetch was not permitted (robots.txt unreachable or disallowing) are held back and not published.

Licence

The texts come from official government sources under various open licences (CC0, CC-BY, OGL, NLOD, public domain) and from codifier platforms, following the existing US practice. Each row's source_platform and source_url identify its origin, so check the source's terms before reuse.

Combined loader (world + US)

US municipal codes stay in endomorphosis/american_municipal_law (not copied). endomorphosis/world_municipal_law world_law/places.parquet holds one pointer row per US GNIS place (place_id gnis:N, country_code US, has_local_data false, source_repo, source_paths, total_docs). world_law_loader.py reads both and maps the US 5-column files (cid, doc_id, doc_order, html_title, html) onto the 35-column schema (other columns null):

from huggingface_hub import hf_hub_download
import importlib.util
spec = importlib.util.spec_from_file_location("wll", hf_hub_download("endomorphosis/world_law_pipeline", "world_law_loader.py"))
wll = importlib.util.module_from_spec(spec); spec.loader.exec_module(wll)
wll.places(countries=["US", "FR"])                          # crosswalk (pandas)
t = wll.load(places=["gnis:1085809", "wd:Q10001"])              # pyarrow Table, 35 columns
t = wll.load(countries=["DE"], include_national=True, max_places=10)
Downloads last month
3,709

Models trained or fine-tuned on endomorphosis/world_national_law