The crimedatasets package provides a curated collection of crime-related datasets from around the world, designed for data analysis, criminology research, and education in Python.
It includes extensive data on mass shootings, hate crimes, incarceration statistics, serial killers, corruption indexes, and criminal justice metrics spanning multiple countries including the United States, Germany, Russia, Spain, France, Sweden, Switzerland, and Scotland.
You can install the crimedatasets package from PyPI:
pip install crimedatasetsimport crimedatasets as crd
# List all available datasets
datasets = crd.list_datasets()
print(datasets)
# Load a specific dataset
df = crd.load_dataset('us_mass_shootings')
print(df.head())| Dataset | Description | Period |
|---|---|---|
berlin_crimes |
Crime in Berlin, Germany | 2012 - 2019 |
texas_deathrow |
Texas death row inmates | 1976 - 2018 |
russia_crimes |
The number of crimes in Russia | 2008-2023 |
arrests_national_juvenile |
Arrests of juveniles in the US by crime category | 1995-2016 |
The crimedatasets library is released under the MIT License, allowing free use for both commercial and non-commercial purposes.