Skip to main content

A curated collection of legal, criminal justice, and political datasets for data analysis, statistical modeling, and machine learning research. Includes U.S. crime rates, court decisions, asylum and immigration data, election results, lawsuits, incarceration statistics, insurance claims, foreign aid, corruption investigations, domestic violence, jury behavior, and more from curated R packages on CRAN.

Project description

legaldatasets

License: GPL-3.0 Python 3.8+

The legaldatasets package provides a curated collection of legal, criminal justice, and political datasets for data analysis, statistical modeling, and machine learning research. Includes U.S. crime rates, court decisions, asylum and immigration data, election results, lawsuits, incarceration statistics, insurance claims, foreign aid, corruption investigations, domestic violence, jury behavior, death penalty sentencing, bankruptcy claims, and more from curated R packages on CRAN.

Installation

You can install the legaldatasets package from PyPI:

pip install legaldatasets

Usage

import legaldatasets as ld

# List all available datasets

datasets = ld.list_datasets()
print(datasets)

# Load a specific dataset

df = ld.load_dataset('us_lawschool_enrollments')
print(df.head())

# Describe dataset

df_01 = ld.describe('liability_claims')
print(df_01)

📊 Some Available Datasets

Dataset Description
us_lawschool_enrollments U.S. law school enrollment statistics by year and gender from 1963 to 2015.
bankruptcy_claims Creditor claims in a bankruptcy case by creditor type and claim amount.
economic_benefits_justice Cross-national data on justice systems and economic indicators including FDI, growth, and development.
corporate_takeover_bids This dataset contains information on takeover bids received by U.S. firms.
trump_lawsuits Federal and state lawsuits involving Donald Trump, including case details and court locations.

Run legaldatasets.list_datasets() or ld.list_datasets() (using ld as alias) to see the full list of available datasets.

Disclaimer

The datasets included in legaldatasets are provided strictly for educational, research, and informational purposes. All datasets originate from curated R packages available on CRAN and retain their original licenses and attributions.

The author of legaldatasets makes no warranties, express or implied, regarding the accuracy, completeness, or suitability of any dataset for a particular purpose. Users are solely responsible for ensuring that their use of these datasets complies with applicable laws, regulations, and ethical guidelines.

Any findings, conclusions, or decisions derived from the use of these datasets are the sole responsibility of the user. The author shall not be held liable for any direct, indirect, incidental, or consequential damages arising from the use or misuse of the datasets included in this library.

For legal advice, case strategy, or any law-related decision-making purposes, always consult a qualified legal professional.

License

The legaldatasets library is released under the GPL-3.0, which allows free use, modification, and distribution, provided that any derivative work is also released under the same GPL-3.0 license. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

legaldatasets-0.1.0.tar.gz (946.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

legaldatasets-0.1.0-py3-none-any.whl (949.5 kB view details)

Uploaded Python 3

File details

Details for the file legaldatasets-0.1.0.tar.gz.

File metadata

  • Download URL: legaldatasets-0.1.0.tar.gz
  • Upload date:
  • Size: 946.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for legaldatasets-0.1.0.tar.gz
Algorithm Hash digest
SHA256 13e9b9536252aa079403bc9982ec983c49928549a85586cc7ae2875f81df7369
MD5 67555c73a0c80ceea1197cfff44c2b4c
BLAKE2b-256 818f2df098cb9784731158caf4ebb61ee55b9195793992518401835214bda54e

See more details on using hashes here.

File details

Details for the file legaldatasets-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: legaldatasets-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 949.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for legaldatasets-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c965f03948d462095577cf45c956ba420dce6ea3ce78690d7b048ec1a4bf8f1
MD5 ba44ba81b947d2de8ab1039e026f8c62
BLAKE2b-256 7d954104fb4d03c4547e431bd34aeaf68f3006912ac79cecc4f1dcf536980e11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page