Giter VIP home page Giter VIP logo

PyPI version Streamlit App

OpenPoliceData

The OpenPoliceData (OPD) Python library is the most comprehensive centralized public access point for incident-level police data in the United States. OPD provides easy access to 425+ incident-level datasets for about 4850 police agencies. Types of data include traffic stops, use of force, officer-involved shootings, and complaints.

Users request data by department name and type of data, and the data is returned as a pandas DataFrame. There is no need to manually find the data online or to know how to work with open data APIs (ArcGIS, Socrata, etc.). When data is loaded by OPD, the returned data is unmodified (with the exception of formatting known date fields) from what appears on the source's site, and OPD provides links to the original data for transparency.

OpenPoliceData can be installed from the Python Package Index (PyPI):

pip install openpolicedata

OpenPoliceData provides access to police data with 2 simple lines of code:

> import openpolicedata as opd
> src = opd.Source("New Orleans")
> data = src.load(table_type="USE OF FORCE", year=2022)

NEW STARTING IN VERSION 0.6: OPD now provides tools for automated data standardization. Applying these tools allow you to start your analysis more quickly by replacing column names and data with standard values for some common column types. Learn how it works and how to use it here.

alt text

Latest Datasets Added to OPD

  • Louisville, KY: Officer-involved shootings data
  • Norwich, CT: Officer-involved shootings data
  • Fairfax County, VA: 2023 arrests, traffic citations, and traffic warnings
  • Asheville, NC: arrests, citations, complaints, incidents, pointing weapon, traffic stops, use of force, and 2023 calls for service
  • Sacramento, CA: 2024 calls for service, 2021-2024 incidents, and 2023-2024 citations
  • Albemarle County, VA: Stops
  • Norman, OK: Crashes, incidents, and traffic stops data (new) and most recent arrests, complaints and use of force data
  • Oakland, CA: Stops
  • Washington D.C.: Lawsuits against MPD
  • Bloomington, IN: Use of Force and Citations

v0.7.1 - 2024-06-01

Added

  • Added subject and officer name to standardization fields for officer-involved shootings only
  • Added capability to handle more formats for storing data in Excel files (different ways of storing data across sheets and multiple tables in a single sheet)

Changed

  • Year column in the OPD source table has been moved to the left to make it more visible

Deprecated

  • Usage of iloc with datasets table is now discouraged due to change in location of Year column

Complete change log available at: https://github.com/openpolicedata/openpolicedata/blob/main/CHANGELOG.md

Contributing

All contributions are welcome including code enhancments, bug fixes, bug reports, documentation updates, and locating new datasets. If you're interesting in helping out, see our Contributing Guide or reach out by email.

openpolicedata's Projects

opd-data icon opd-data

Information on incident-level police datasets for openpolicedata Python package

opd-dev icon opd-dev

Support code for development of the openpolicedata Python package

opd_explorer icon opd_explorer

Streamlit app for downloading data available in the OpenPoliceData Python Package (https://pypi.org/project/openpolicedata) from the web

openpolicedata icon openpolicedata

The OpenPoliceData (OPD) Python library is the most comprehensive centralized public access point for incident-level police data in the United States. OPD provides easy access to 425+ incident-level datasets for about 4800 police agencies. Types of data include traffic stops, use of force, officer-involved shootings, and complaints.

police-shootings icon police-shootings

Code for finding police shootings that are not present in public databases

pylis icon pylis

An interface for accessing data from the Virginia Legislative Information System's Law Portal (law.lis.virginia.gov) including Virginia code and Constitution

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.