| Index | Description |
|---|---|
| Overview | See the motivation behind this project. |
| Description | Learn more about the problem, implemented solution and challenges faced. |
| Deployment Guide | How to install Smartbeats architecture. |
| How to Use | Instructions to use Smartbeats. |
| Credits | Meet the team behind this. |
| License | License details. |
The Arizona State University Smart City Cloud Innovation Center Powered by AWS (ASU CIC) recently collaborated with the City of Glendale, Arizona to improve the process for designing and maintaining patrol areas.
Glendale aims to be able to provide a safe and timely response to calls for service. Today this process is done manually and relies on the personal knowledge of those who make the schedule and can be time consuming if an officer must take a sudden leave of absence and the scheduler must make several calls in order to find a replacement. This process can evolve with SmartBeats, a cloud-based service that can assist in scheduling police patrol areas.
Customers are responsible for making their own independent assessment of the information in this document.
This document:
(a) is for informational purposes only,
(b) references AWS product offerings and practices, which are subject to change without notice,
(c) does not create any commitments or assurances from AWS and its affiliates, suppliers or licensors. AWS products or services are provided "as is" without warranties, representations, or conditions of any kind, whether express or implied. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers, and
(d) is not to be considered a recommendation or viewpoint of AWS.
Additionally, you are solely responsible for testing, security and optimizing all code and assets on GitHub repo, and all such code and assets should be considered:
(a) as-is and without warranties or representations of any kind,
(b) not suitable for production environments, or on production or other critical data, and
(c) to include shortcuts in order to support rapid prototyping such as, but not limited to, relaxed authentication and authorization and a lack of strict adherence to security best practices.
All work produced is open source. More information can be found in the GitHub repo.
Each year the Glendale Police Department updates their patrol beats in order to improve response times and ensure that resources are placed where they are needed. As Glendale grows and changes, the needs of the community change. One area may have higher rates of traffic than it did last year, slowing down response time, or something else may have changed that makes it harder for Glendale Police to serve their community. This year they approached the Arizona State University Smart City Cloud Innovation Center (ASU CIC) for a solution in restructuring the beats. The ASU CIC seeks to build a solution that produces beat schedules that optimize response time and puts resources that are needed.
Using data analytics, the ASU CIC will produce SmartBeats, a cloud-based software prototype that takes into account factors such as calls-for-services, incident information, disposition data and more in order to create optimal options for police schedules and beats. SmartBeats will help optimize schedules in less than optimal conditions, such as when an officer is out on leave. It can also help officers accomplish the department goal of spending a third of their time responding to calls, another third doing administrative tasks, and the final third being available and engaging with their community. The goal is to ensure a safe and timely response, provide more resources to communities, and increase community engagement to build better relationships with the community.
The functionality of Smartbeats is divided into two services:
Smartbeats require two input files to generate beats:
- City shapefile which contains City area divided into neighborhoods/polygons
- Crime data in .csv format (We'll also provide the exact format of all required columns)
The user can generate beats by utilizing the following filtering options:
-
Beat creation criteria:
- Calls For Service: Specify the approximate count of Calls-for-service (911 calls) per beat
- Number of Beats: Specify the exact number of beats to divide the city into
-
Type of data to use (Calls-for-service/Incident data)
- Calls-For-Service data: 911 call received by the Police Department. Utilize all Calls-For-Service data to generate beats.
- Incident data only: Subset of Calls-For-Service data (911 calls) that end up getting registered is called an incident. Utilize incident data to generate beats.
-
Priority: Every Call-For-Service has an associated priority within range [Highest Priority=1, Lowest Priority=9].
User can configure priority values in
settings.pyconfig file of web-tier. -
Dispositions: Disposition is the final status of the call
User can configure Disposition values in
settings.pyconfig file of web-tier -
Start date and time: Specify starting date and time
-
End date and time: Specify ending date and time
Smartbeats is developed using a microserivce based architecture. It has two components, a web-tier and an app-tier. The web-tier hosts the frontend and the data ingestion service. The app-tier runs ArcGIS Pro for spatial data processing and generating beats.
We have used the following technologies to develop the application:
- Python + Django: Application Development
- Amazon S3: To store crime .csv and city shapefile
- Amazon Aurora: To store data in crime .csv file
- Amazon EC2: Deployment of web-tier
- Pandas: Data preprocessing
- GeoPandas: Spatial joins and geo-processing
- Folium: Visualization of generated beats map
- Python + Flask: Application Development
- Amazon S3: To store beats shapefile
- ArcGIS Pro: Spatial data processing
- Amazon EC2: Windows EC2 to host ArcGIS Pro and deploy App server
Smartbeats uses BuildBalancedZones() API of ArcGIS Pro to divide a city into zones(beats) based on the beat creation criteria provided by the user. Since BuildBalancedZones() uses genetic algorithm for spatial optimization, it is not guaranteed to reach a perfect solution i.e. getting the exact number of beats. To solve this issue, we developed a calibrator that recursively increments the zones count until the target zones count is achieved. The user can specify the iteration count in the app-tier config file. The default value is 20.
BEATS_COUNT_CALIBRATOR_TRIALS = 20
- The early versions of Smartbeats also supported Geocoding: the process of converting addresses (like a street address) into geographic coordinates (like latitude and longitude). But this functionality is removed from the final prototype on account of Geocoding APIs being very costly. So, we are expecting Crime csv data to have geographic addresses converted to lat-long
geometry_wktformat - We have provided the sample Crime csv file that is required to generate beats. We are expecting the input file to be in the exact format and contain following columns:
event_number: Call-For-Service ID. Note: Every value must be uniquepriority: Every Call-For-Service has an associated priority within range [Highest Priority=1, Lowest Priority=9]address: Address from where Call-For-Service was recievedis_incident: Was the Call-For-Service registered as an incident or notgeometry_wkt: Point Geometry coordiante of Call-For-Servicetimestamp: Timestamp when Call-For-Service was recordeddisposiiton: The final status of Call-For-Service
- The Crime csv and the City shapefile must belong to the same city
- Our application will not perform Geo-coding (the process of converting addresses into geographic coordinates). It has to be done on user end to create Crime csv file
- We are using ArcGIS Pro: buildBalancedZones() API in the backend. The user must have an active ArcGIS Pro subscription in the application server
- All spatial components (Geometry) like Points and Polygons in the input files (City shapefile + Crime csv) must have
epsg:4326
- Overlaying beats map with real time police officer location information
- Real-time manual manipulation of the generated Beats map
- Include more beat generation parameters
- Utilize ArcGIS Pro server licensing to scale app-tier
- Deploy application on AWS Beanstalk (PaaS) or AWS Lambda (FaaS)
- Create an email notification service to notify the user when the beat generation process is complete
- Store history of generated beats
- Color coding beats based on incident resolution data.
- Use information such as phone calls, traffic data and CCTV footage to analyze and generate better beats.
-
Home page
-
Click on New Beats Generation on home page to upload new city shapefile and crime data
-
Click on Utilize Existing Data on home page to generate beats from previously uploaded data
-
Fill in the parameters to create beats and click on Generate
-
Select how beats are created
- Calls For Service: Specify the approximate count of Calls-for-service (911 calls) per beat
- Number of Beats: Specify the exact number of beats to divide the city into
-
Specify type of data to display
- Calls-For-Service data: 911 call received by the Police Department. Utilize all Calls-For-Service data to generate beats.
- Incident data only: Subset of Calls-For-Service data (911 calls) that end up getting registered is called an incident. Utilize incident data to generate beats.
-
Select Priority
Every Call-For-Service has an associated priority within range [Highest Priority=1, Lowest Priority=9]. -
Select dispositions
Disposition is the final status of the call -
Select a starting datetime
Specify starting date and time -
Select an ending datetime
Specify ending date and time
-
-
Get a fully responsive dynamic Beats map as result
"Smartbeats" is an open source software. The following people have contributed to this project.
Developers:
Risabh Raj
Sameet Kumar
UI Designer: Sarah Vue
Sr. Program Manager, AWS: Jubleen Vilku
Digital Innovation Lead, AWS: Jason Whittet
General Manager, ASU: Ryan Hendrix
This project is designed and developed with guidance and support from the ASU Cloud Innovation Center and the City of Glendale, Arizona teams.
This project is distributed under the Apache License 2.0




