A full record of SAPD's calls for service.
View Data
·
Report Bug
·
Request Feature
Table of Contents
TL;DR: This bot updates an archive of calls to service to the San Antonio Police Department. The aim is to provide a full and accessible record of calls to service to SAPD.
The San Antonio Police Department (SAPD) maintains two dashboards that provide a record of calls to service. One for historical calls and another focused on the last seven days (updated once a week).
The historical calls web app is problematic because it can only return 10,000 call records at a time. If you want to look at these data over time for each ZIP code area around San Antonio going back ten years, you're going to have to click through thousands of forms. And even if you were to do that, there is an issue with the web app where it doesn't spit out the the data in a format accessible to the public when you click the "Export to Excel." button. It downloads a .aspx file instead.
The dashboard dedicated to the last seven days has something that the historical calls database doesn't have: call coordinates. This is useful for performing spatial analysis on the data. Unfortunately, the there is no way for the public to access this data.
Enter this bot. It checks for new calls to service listed in the dashboard dedicated to the last seven days and adds them to an archive.
This means that in the future, you won't need to go to SAPD's website to pull data. You can just check the archive here and download everything in its entirety.
Note: SAPD makes clear that this data are not crimes but calls for service.
Police Calls for service reflect each time someone called the police for service. These are CALLS FOR SERVICE, NOT Lists of Crimes or Crime Reports. Calls are titled as they are called in and dispatched. For example, a call may be dispatched as a "robbery", as called in by a citizen, but later the officer finds it is a "burglary." This would be listed in the Calls for Service report as a "robbery".
If you want to run this code locally, here you go.
- Clone the repo
git clone https://github.com/ryan-serpico/sa-sapd-calls-mirror.git
- Install packages
pip3 install -r requirements.txt
- Run the bot
python3 app.py
- Add calls for service prior to August 17, 2022 to archive.csv.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.md
for more information.
Ryan Serpico - @ryan_serpico - [email protected]
Project Link: https://github.com/ryan-serpico/sa-sapd-calls-mirror
- Taylor Pettaway for giving me a reason to finally do this.
- The City of San Antonio
- The San Antonio Police Department