Dataset Viewer
Auto-converted to Parquet Duplicate
id
int64
1
101k
code
stringclasses
237 values
name
stringclasses
234 values
type
stringclasses
5 values
parent_code
null
1
us
United States
country
null
100,907
ca
CA
country
null
100,908
de
DE
country
null
100,909
fr
FR
country
null
100,910
us-california
California
state
null
100,912
us-ca
California
state
null
100,913
canada
Canada
country
null
100,914
germany
Germany
country
null
100,915
spain
Spain
country
null
100,916
australia
Australia
country
null
100,917
japan
Japan
country
null
100,918
sweden
Sweden
country
null
100,919
netherlands
Netherlands
country
null
100,920
argentina
Argentina
country
null
100,921
ecuador
Ecuador
country
null
100,922
bolivia
Bolivia
country
null
100,923
paraguay
Paraguay
country
null
100,924
uruguay
Uruguay
country
null
100,925
costarica
Costarica
country
null
100,926
southafrica
Southafrica
country
null
100,927
nigeria
Nigeria
country
null
100,928
kenya
Kenya
country
null
100,929
ethiopia
Ethiopia
country
null
100,930
tanzania
Tanzania
country
null
100,931
uganda
Uganda
country
null
100,932
angola
Angola
country
null
100,933
mozambique
Mozambique
country
null
100,934
zimbabwe
Zimbabwe
country
null
100,935
botswana
Botswana
country
null
100,936
namibia
Namibia
country
null
100,937
mauritius
Mauritius
country
null
100,938
singapore
Singapore
country
null
100,939
pakistan
Pakistan
country
null
100,940
bangladesh
Bangladesh
country
null
100,941
nepal
Nepal
country
null
100,942
mongolia
Mongolia
country
null
100,943
brunei
Brunei
country
null
100,944
uae
Uae
country
null
100,945
kuwait
Kuwait
country
null
100,946
bahrain
Bahrain
country
null
100,947
lebanon
Lebanon
country
null
100,948
palestine
Palestine
country
null
100,949
czechia
Czechia
country
null
100,950
hungary
Hungary
country
null
100,951
austria
Austria
country
null
100,952
greece
Greece
country
null
100,953
finland
Finland
country
null
100,954
norway
Norway
country
null
100,955
ireland
Ireland
country
null
100,956
malta
Malta
country
null
100,957
cyprus
Cyprus
country
null
100,958
estonia
Estonia
country
null
100,959
latvia
Latvia
country
null
100,960
russia
Russia
country
null
100,961
serbia
Serbia
country
null
100,962
croatia
Croatia
country
null
100,963
macedonia
Macedonia
country
null
100,964
montenegro
Montenegro
country
null
100,965
barbados
Barbados
country
null
100,966
guyana
Guyana
country
null
100,967
suriname
Suriname
country
null
100,968
panama
Panama
country
null
100,969
dominicanrepublic
Dominicanrepublic
country
null
100,970
benin
Benin
country
null
100,971
burkinafaso
Burkinafaso
country
null
100,972
burundi
Burundi
country
null
100,973
comoros
Comoros
country
null
100,974
congo
Congo
country
null
100,975
djibouti
Djibouti
country
null
100,976
equatorialguinea
Equatorialguinea
country
null
100,977
eritrea
Eritrea
country
null
100,978
eswatini
Eswatini
country
null
100,979
gabon
Gabon
country
null
100,980
lesotho
Lesotho
country
null
100,981
madagascar
Madagascar
country
null
100,982
malawi
Malawi
country
null
100,983
seychelles
Seychelles
country
null
100,984
togo
Togo
country
null
100,985
libya
Libya
country
null
100,986
sudan
Sudan
country
null
100,987
uzbekistan
Uzbekistan
country
null
100,988
afghanistan
Afghanistan
country
null
100,989
eastimor
Eastimor
country
null
100,990
cuba
Cuba
country
null
100,991
haiti
Haiti
country
null
100,992
belize
Belize
country
null
100,994
georgia
Georgia
country
null
100,995
armenia
Armenia
country
null
100,996
northmacedonia
Northmacedonia
country
null
100,997
kosovo
Kosovo
country
null
100,998
liechtenstein
Liechtenstein
country
null
100,999
sanmarino
Sanmarino
country
null
101,000
dominica
Dominica
country
null
101,001
saintlucia
Saintlucia
country
null
101,002
saintvincent
Saintvincent
country
null
101,003
bhutan
Bhutan
country
null
101,004
timor
Timor
country
null
101,005
tonga
Tonga
country
null
101,006
samoa
Samoa
country
null
101,007
uk
United Kingdom
country
null
End of preview. Expand in Data Studio

The Law - Global Legal Codes Database

101,262 laws from 181 jurisdictions

Contents

Category Count
US Federal Code 100,906 laws
Country Criminal Codes 155 countries
Constitutions 68
International Treaties 25
Historical Codes 5 (Hammurabi, Magna Carta, etc.)

Languages

20+ languages including English, Spanish, French, German, Arabic, Chinese, Russian, Portuguese, Japanese, Korean, and more.

Database Schema

SQLite database with tables:

  • legal_sections - Main law text content
  • jurisdictions - Country/state metadata
  • categories - Law categorization

Usage

from huggingface_hub import hf_hub_download
import sqlite3

# Download the database
db_path = hf_hub_download(
    repo_id="PunkRockGirl/the-law",
    filename="legal_clean.db",
    repo_type="dataset"
)

# Connect and query
conn = sqlite3.connect(db_path)
cursor = conn.cursor()

# Example: Find murder laws
cursor.execute("SELECT * FROM legal_sections WHERE heading LIKE '%Murder%' LIMIT 5")
for row in cursor.fetchall():
    print(row)

conn.close()

License

Public domain (CC0-1.0). Laws are public records.

Source

Compiled from official government sources, legal databases, and public records.

Downloads last month
85