Name | openpolicedata JSON |
Version |
0.8.1
JSON |
| download |
home_page | None |
Summary | 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 4865 police agencies. Types of data include traffic stops, use of force, officer-involved shootings, and complaints. |
upload_time | 2024-09-02 21:44:59 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | BSD 3-Clause License Copyright (c) 2021, sowdm All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
police data
use of force
traffic
stops
complaints
officer-involved
shootings
pandas
arcgis
socrata
police transparency
police accountability
|
VCS |
|
bugtrack_url |
|
requirements |
sodapy
pandas
rapidfuzz
numpy
requests
packaging
tqdm
openpyxl
typing-extensions
xlrd
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![PyPI version](https://badge.fury.io/py/openpolicedata.svg)](https://badge.fury.io/py/openpolicedata)
[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://openpolicedata.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 4865 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](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html). 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.](https://openpolicedata.readthedocs.io/en/stable/getting_started/index.html#Data-Standardization)
- Documentation: https://openpolicedata.readthedocs.io/
- Source Code: https://github.com/openpolicedata/openpolicedata
- Bug Tracker: https://github.com/openpolicedata/openpolicedata/issues
- [Latest Datasets](#latest-datasets-added)
- [Release Notes](#release-notes-for-version-057-2023-09-05)
- [Contributing](#contributing)
![alt text](https://github.com/openpolicedata/opd-data/blob/main/OPD_Datasets_Map.png?raw=true)
## Latest Datasets Added to OPD
- Washington D.C.: Historical (2010-2017) stops data
- South Bend, IN: Complaints involving administrative investigations
- Tucson, AZ: Added additional years of arrests
- Sacramento, CA: Calls for service and citations
- Cedar Lake, IN: Arrests, calls for service, and citations data
- Griffith, IN: Arrests, calls for service, and citations data
- Austin, TX: Arrests, incidents, searches, use of force, and warnings
- New York, NY: Latest pedestrian stops dataset
- Chicago, IL: Latest pedestrian stops dataset
- Washington D.C.: Latest use of force dataset
## v0.8.1 - 2024-09-02
### Fixed
- Fixed bug in get_count function for CSV files where count was wrong if there were quotes containing new line characters
## v0.8 - 2024-08-24
### Added
- Added data loader for HTML tables
### Changed
- Changed error messages so that more errors in data loading point the user to the list of data site outages
### Fixed
- Fixed bug in CKAN data loader when user requests a range of years
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](https://github.com/openpolicedata/openpolicedata/blob/main/CONTRIBUTING.MD) or reach out by [email](mailto:openpolicedata@gmail.com).
Raw data
{
"_id": null,
"home_page": null,
"name": "openpolicedata",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "police data, use of force, traffic, stops, complaints, officer-involved, shootings, pandas, arcgis, socrata, police transparency, police accountability",
"author": null,
"author_email": "Matt Sowd <openpolicedata@gmail.com>, Paul Otto <potto@ieee.org>",
"download_url": "https://files.pythonhosted.org/packages/32/7c/814c3d9b756f3ec07c4365f2f3f550fa688d006844fa4cc81d7cd0374359/openpolicedata-0.8.1.tar.gz",
"platform": null,
"description": "[![PyPI version](https://badge.fury.io/py/openpolicedata.svg)](https://badge.fury.io/py/openpolicedata)\r\n[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://openpolicedata.streamlit.app)\r\n\r\n# OpenPoliceData\r\nThe 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 4865 police agencies. Types of data include traffic stops, use of force, officer-involved shootings, and complaints. \r\n\r\nUsers request data by department name and type of data, and the data is returned as a [pandas DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html). 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.\r\n\r\nOpenPoliceData can be installed from the Python Package Index (PyPI):\r\n```\r\npip install openpolicedata\r\n``` \r\n\r\nOpenPoliceData provides access to police data with 2 simple lines of code:\r\n```\r\n> import openpolicedata as opd\r\n> src = opd.Source(\"New Orleans\")\r\n> data = src.load(table_type=\"USE OF FORCE\", year=2022)\r\n```\r\n\r\n> **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.](https://openpolicedata.readthedocs.io/en/stable/getting_started/index.html#Data-Standardization)\r\n\r\n- Documentation: https://openpolicedata.readthedocs.io/\r\n- Source Code: https://github.com/openpolicedata/openpolicedata\r\n- Bug Tracker: https://github.com/openpolicedata/openpolicedata/issues\r\n- [Latest Datasets](#latest-datasets-added)\r\n- [Release Notes](#release-notes-for-version-057-2023-09-05)\r\n- [Contributing](#contributing)\r\n\r\n\r\n![alt text](https://github.com/openpolicedata/opd-data/blob/main/OPD_Datasets_Map.png?raw=true)\r\n\r\n## Latest Datasets Added to OPD\r\n- Washington D.C.: Historical (2010-2017) stops data\r\n- South Bend, IN: Complaints involving administrative investigations\r\n- Tucson, AZ: Added additional years of arrests\r\n- Sacramento, CA: Calls for service and citations\r\n- Cedar Lake, IN: Arrests, calls for service, and citations data\r\n- Griffith, IN: Arrests, calls for service, and citations data\r\n- Austin, TX: Arrests, incidents, searches, use of force, and warnings\r\n- New York, NY: Latest pedestrian stops dataset\r\n- Chicago, IL: Latest pedestrian stops dataset\r\n- Washington D.C.: Latest use of force dataset\r\n\r\n## v0.8.1 - 2024-09-02\r\n### Fixed\r\n- Fixed bug in get_count function for CSV files where count was wrong if there were quotes containing new line characters\r\n\r\n## v0.8 - 2024-08-24\r\n### Added\r\n- Added data loader for HTML tables\r\n### Changed\r\n- Changed error messages so that more errors in data loading point the user to the list of data site outages\r\n### Fixed\r\n- Fixed bug in CKAN data loader when user requests a range of years\r\n\r\nComplete change log available at: https://github.com/openpolicedata/openpolicedata/blob/main/CHANGELOG.md\r\n\r\n## Contributing\r\nAll 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](https://github.com/openpolicedata/openpolicedata/blob/main/CONTRIBUTING.MD) or reach out by [email](mailto:openpolicedata@gmail.com).\r\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License Copyright (c) 2021, sowdm All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
"summary": "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 4865 police agencies. Types of data include traffic stops, use of force, officer-involved shootings, and complaints.",
"version": "0.8.1",
"project_urls": {
"documentation": "https://openpolicedata.readthedocs.io/en/stable/documentation.html",
"homepage": "https://openpolicedata.readthedocs.io/",
"repository": "https://github.com/openpolicedata/openpolicedata",
"tracker": "https://github.com/openpolicedata/openpolicedata/issues"
},
"split_keywords": [
"police data",
" use of force",
" traffic",
" stops",
" complaints",
" officer-involved",
" shootings",
" pandas",
" arcgis",
" socrata",
" police transparency",
" police accountability"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "821985b13e4e162e38af863f7b3cf0655fea1be4cb53341be1081348b7809432",
"md5": "90eb964601f6af79d1057889a7e7ca76",
"sha256": "8b4199c2100db70277e766459a182a54dda2ec70dfcfa813baf82bcb58f7943b"
},
"downloads": -1,
"filename": "openpolicedata-0.8.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "90eb964601f6af79d1057889a7e7ca76",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 116564,
"upload_time": "2024-09-02T21:44:53",
"upload_time_iso_8601": "2024-09-02T21:44:53.785713Z",
"url": "https://files.pythonhosted.org/packages/82/19/85b13e4e162e38af863f7b3cf0655fea1be4cb53341be1081348b7809432/openpolicedata-0.8.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "327c814c3d9b756f3ec07c4365f2f3f550fa688d006844fa4cc81d7cd0374359",
"md5": "9bb5d7831fc274665939ad7801bf3d9d",
"sha256": "30b9691da960f780a97633a26bc40a88a0af54144c3c09a670d54a7234926f94"
},
"downloads": -1,
"filename": "openpolicedata-0.8.1.tar.gz",
"has_sig": false,
"md5_digest": "9bb5d7831fc274665939ad7801bf3d9d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 142221,
"upload_time": "2024-09-02T21:44:59",
"upload_time_iso_8601": "2024-09-02T21:44:59.616663Z",
"url": "https://files.pythonhosted.org/packages/32/7c/814c3d9b756f3ec07c4365f2f3f550fa688d006844fa4cc81d7cd0374359/openpolicedata-0.8.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-02 21:44:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "openpolicedata",
"github_project": "openpolicedata",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "sodapy",
"specs": []
},
{
"name": "pandas",
"specs": [
[
">=",
"2.1"
],
[
"<",
"3.0.0"
]
]
},
{
"name": "rapidfuzz",
"specs": []
},
{
"name": "numpy",
"specs": [
[
"<",
"2.0.0"
]
]
},
{
"name": "requests",
"specs": []
},
{
"name": "packaging",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "openpyxl",
"specs": []
},
{
"name": "typing-extensions",
"specs": []
},
{
"name": "xlrd",
"specs": []
}
],
"lcname": "openpolicedata"
}