Dataset Viewer

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

World Municipal Law

Local (municipal / county / water-board / regional) law worldwide, normalized to one schema. Companion to endomorphosis/american_municipal_law, which stays unchanged.

Split: national law lives in world_national_law

Since 2026-10-11, national, subnational (first-level: state / Land / province / région) and supranational law, i.e. every iso:* place (iso_FR, iso_ES-CT, iso_EU, …), is published in endomorphosis/world_national_law, which uses the same schema and layout. This repo keeps municipal and other local law (municipalities, counties, water boards, …). The iso_* files were copied there first, verified (sha256 and row counts), and then deleted here in a separate commit; the repo history still has them.

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 (DE, FR, IT) 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 _ (wd_Q90 = Paris, 1008538 = a US place by GNIS, KG-kg_cbd_<organ id> = a Kyrgyz aiyl aimak council without a Wikidata item, place_id KG-kg_cbd:<organ id> keyed by its CBD (cbd.minjust.gov.kg) issuing-organ id; a QID found later is added as qid, the place_id stays).

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: 3,284,470 in 48,764 places.
  • From a web archive (Wayback / Common Crawl; archive_source set): 124,870 (3.8%).
  • 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): 8,563.
  • content_complete = false (metadata-only or partial text): 394,215.
  • source_official = false (non-government mirror/aggregator): 8,334.
  • 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 4 270 247 91.5% 0 5 0
AL 34 1,950 1,950 100.0% 0 1,099 0
AM 17 797 797 100.0% 0 324 0
AR 201 5,691 5,691 100.0% 0 2,411 0
AT 241 4,146 2,006 48.4% 0 0 0
AU 353 4,167 1,125 27.0% 0 680 0
BA 33 1,562 1,562 100.0% 0 494 0
BE 223 173,504 2 0.0% 2 0 0
BJ 3 43 43 100.0% 0 25 0
BN 3 39 0 0.0% 0 0 0
BO 23 929 929 100.0% 0 659 0
BR 4,161 435,183 0 0.0% 0 290,060 0
BW 2 6 3 50.0% 0 2 0
CA 1,395 58,245 0 0.0% 0 0 0
CI 2 5 5 100.0% 0 0 0
CL 337 9,816 0 0.0% 0 5 0
CM 14 43 43 100.0% 0 5 0
CO 761 5,597 5,597 100.0% 0 5,312 0
CR 84 2,406 631 26.2% 0 109 0
CU 1 2 2 100.0% 0 0 0
CV 13 43 18 41.9% 0 2 0
CZ 1,206 10,658 337 3.2% 0 0 0
DE 6,038 219,340 6,149 2.8% 4,624 774 0
DO 16 710 710 100.0% 0 360 0
DZ 14 99 99 100.0% 0 4 0
EC 111 1,644 1,644 100.0% 0 691 0
EE 78 1,970 0 0.0% 0 0 0
EG 18 220 220 100.0% 0 161 0
ES 2,015 74,368 1 0.0% 0 1 0
ET 4 19 19 100.0% 0 7 0
FJ 13 142 0 0.0% 0 0 0
FR 10,535 329,142 1 0.0% 1 3,840 0
GB 411 2,837 26 0.9% 26 0 0
GE 21 546 546 100.0% 0 99 0
GH 58 122 120 98.4% 0 55 0
GM 2 2 2 100.0% 0 0 0
GR 336 29,747 0 0.0% 0 0 0
GT 246 1,499 83 5.5% 0 1,466 0
HN 4 11 11 100.0% 0 2 0
HR 361 13,875 13,875 100.0% 0 5,231 0
ID 437 18,686 2,540 13.6% 0 1,701 0
IE 31 845 1 0.1% 1 0 0
IL 7 85 0 0.0% 0 14 0
IN 5 7 0 0.0% 0 0 0
IQ 14 63 63 100.0% 0 18 0
IR 120 2,721 2,711 99.6% 0 865 0
IT 7,615 66,286 0 0.0% 0 2 0
JM 3 70 70 100.0% 0 6 0
JO 12 88 88 100.0% 0 37 0
JP 1,080 493,306 3,995 0.8% 3,091 0 0
KE 45 983 0 0.0% 0 12 0
KG 530 91,597 0 0.0% 0 0 0
KR 132 609 609 100.0% 603 0 0
KZ 36 737 737 100.0% 0 15 0
LB 17 54 54 100.0% 0 9 0
LR 5 96 4 4.2% 0 6 0
LT 30 86 86 100.0% 0 0 0
LV 35 3,590 0 0.0% 0 0 0
MA 56 393 393 100.0% 0 156 0
MD 75 4,612 4,612 100.0% 0 933 0
ME 22 548 548 100.0% 0 287 0
MK 34 249 249 100.0% 0 117 0
MN 314 1,268 0 0.0% 0 0 0
MW 9 23 6 26.1% 0 17 21
MX 388 3,426 319 9.3% 0 0 0
MY 3 80 0 0.0% 0 38 0
MZ 2 4 0 0.0% 0 0 0
NG 13 87 16 18.4% 0 40 0
NI 3 29 29 100.0% 0 9 0
NL 366 121,429 0 0.0% 0 0 0
NP 66 1,753 0 0.0% 0 0 0
NZ 29 323 0 0.0% 0 24 0
OM 1 2 2 100.0% 0 1 0
PA 21 37 37 100.0% 0 7 0
PE 1,128 46,026 4 0.0% 0 46,010 0
PH 200 12,856 808 6.3% 0 8,744 87
PL 2,418 781,403 1,155 0.1% 0 0 0
PS 11 99 99 100.0% 0 35 0
PT 306 6,670 0 0.0% 0 0 0
PY 42 2,015 2,015 100.0% 0 1,029 0
QA 1 40 40 100.0% 0 0 0
RO 659 104,644 113 0.1% 0 3,951 0
RS 161 5,564 5,564 100.0% 0 1,734 0
RU 110 437 22 5.0% 0 0 0
SA 6 56 53 94.6% 0 23 0
SB 1 35 0 0.0% 0 0 0
SI 203 20,030 0 0.0% 0 0 0
SK 931 19,637 0 0.0% 0 0 0
SL 5 6 6 100.0% 0 0 0
SN 2 44 44 100.0% 0 24 0
SO 3 4 4 100.0% 0 0 0
SS 1 24 0 0.0% 0 0 0
SV 9 116 116 100.0% 0 55 0
SY 9 265 265 100.0% 0 240 0
TC 1 19 0 0.0% 0 0 0
TG 1 20 20 100.0% 0 19 0
TL 5 9 0 0.0% 0 0 0
TN 69 985 985 100.0% 0 425 0
TR 481 13,134 5,485 41.8% 41 2,471 0
TW 9 11,487 2,748 23.9% 0 2 0
TZ 90 274 84 30.7% 0 218 190
UA 457 41,095 41,095 100.0% 0 10,691 0
UG 57 159 106 66.7% 0 54 23
US 76 7,590 0 0.0% 0 70 7,552
UY 19 143 97 67.8% 0 35 0
UZ 178 1,171 0 0.0% 0 0 0
VE 14 163 163 100.0% 0 22 0
VN 7 174 174 100.0% 174 0 0
VU 3 31 0 0.0% 0 5 0
ZA 75 2,321 1,888 81.3% 0 51 335
ZM 59 132 29 22.0% 0 105 126
ZW 9 25 25 100.0% 0 5 0

Configs

default covers every country; there is also one config per ISO 3166-1 country code (AE, AL, AM, AR, AT, AU, BA, BE, BJ, BN, BO, BR, BW, CA, CI, CL, CM, CO, CR, CU, CV, CZ, DE, DO, DZ, EC, EE, EG, ES, ET, FJ, FR, GB, GE, GH, GM, GR, GT, HN, HR, HU, ID, IE, IL, IN, IQ, IR, IT, JM, JO, JP, KE, KG, KR, KZ, LB, LR, LT, LV, MA, MD, ME, MK, MN, MW, MX, MY, MZ, NG, NI, NL, NP, NZ, OM, PA, PE, PH, PL, PS, PT, PY, QA, RO, RS, RU, SA, SB, SI, SK, SL, SN, SO, SS, SV, SY, TC, TG, TL, TN, TR, TW, TZ, UA, UG, US, UY, UZ, VE, VN, VU, 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
63,880

Models trained or fine-tuned on endomorphosis/world_municipal_law