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 383+ incident-level datasets for over 3500 police agencies. Types of data include traffic stops, use of force, officer-involved shootings, and complaints.
Project description
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 383+ incident-level datasets for over 3500 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.).
OpenPoliceData provides access to police data with 2 simple lines of code:
> import openpolicedata as opd
> src = opd.Source("New Orleans")
> data = src.load_from_url(year=2022, table_type="USE OF FORCE")
- Documentation: https://openpolicedata.readthedocs.io/
- Source Code: https://github.com/openpolicedata/openpolicedata
- Bug Tracker: https://github.com/openpolicedata/openpolicedata/issues
- Basic Installation
- Latest Datasets
- Release Notes
- Contributing
Installation
OpenPoliceData can be installed from the Python Package Index (PyPI):
pip install openpolicedata
Latest Datasets Added
- Albany, NY Arrests, Calls for Service, Field Contacts, Indcidents, Traffic Citations, and Use of Force
- Asheville, NC 2022 Calls For Service
- Boulder, CO Arrests, Crashes,and Incidents
- California Deaths in Custody
- Chandler, AZ Arrests, Incidents, and Calls for Service
- Chattanooga, TN Complaints
- Lincoln, NE 2023 datasets
- New York City, NY 2022 Pedestrian Stops
- Oakland, CA 2022 Use of Force
- San Diego, CA 2022 Complaints
- San Jose, CA 2022 and 2023 Calls for Service
- Tacoma, WA Complaints, Incidents, and Officer-Involved Shootings
Release Notes for Version 0.5.7 (2023-09-05)
Added
- Subclassing pandas DataFrame and Series when appropriate to enable deprecation messaging of certain Table Type names
- Documentation is now available at https://openpolicedata.readthedocs.io/
- Now require specification of Excel worksheets when loading Excel notebooks where the location of the data is unclear
Changed
- An empty DataFrame is now returned when the request contains no data. Previously, None was returned.
Deprecated
- The word CIVILIAN in table type names has been replaced by SUBJECT to be consistent with the standard set by the Stanford Open Policing Project.
Fixed
- Fixed date filtering in CSV and Excel data loaders
Recent Datasets Added
- Albany, NY Arrests, Calls for Service, Field Contacts, Indcidents, Traffic Citations, and Use of Force
- Asheville, NC 2022 Calls For Service
- Boulder, CO Arrests, Crashes,and Incidents
- California Deaths in Custody
- Chandler, AZ Arrests, Incidents, and Calls for Service
- Chattanooga, TN Complaints
- Lincoln, NE 2023 datasets
- New York City, NY 2022 Pedestrian Stops
- Oakland, CA 2022 Use of Force
- San Diego, CA 2022 Complaints
- San Jose, CA 2022 and 2023 Calls for Service
- Tacoma, WA Complaints, Incidents, and Officer-Involved Shootings
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for openpolicedata-0.5.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc3eec090165cf320547a8d11cbbd1180291ac1710537f652b19714b3c219e1e |
|
MD5 | 5616e4a7bd927b44f996b2a6d9072fc9 |
|
BLAKE2b-256 | de80d121e5e239ba9f601f7c5de6cb0349da2026c46b2544110f0cbe8900daed |