IBM Cloud Data Services
open crime datamaking pokémon go a safer spaceRaj Singh, PhDDeveloper Advocate: Geo | Open [email protected]://ibm.biz/rajrsingh twitter: @rajrsingh
@rajrsinghIBM Cloud Data Services
Read my newsletter on open data!http://opendatamag.rajsingh.org
Some background
Developer Advocate, Geo + open dataIBM Analytics
MCP, Ph.D.Urban Studies & Planning
@rajrsinghIBM Cloud Data Services
Agenda
• Finding and harvesting open crime data• Data wrangling & schema reconciliation• Products
• data service• safety app
@rajrsinghIBM Cloud Data Services
Architecture
@rajrsinghIBM Cloud Data Services
Harvesting CrimeData
@rajrsinghIBM Cloud Data Services
Open data is on the rise
open data?
Technology maturity curve
@rajrsinghIBM Cloud Data Services
Where to find data
https://data.cityofboston.gov/Public-Safety/Crime-Incident-Reports-August-2015-To-Date-Source-/fqn4-4qap
@rajrsinghIBM Cloud Data Services
The Socrata API
@rajrsinghIBM Cloud Data Services
DataWrangling
Gaucho Data Wrangler. Picture by Dave Werkley, http://compendiumofcountries.org/wiki/index.php?title=File:Data_Wrangler_-_Gaucho.png
@rajrsinghIBM Cloud Data Services
Data wrangling crime codes
@rajrsinghIBM Cloud Data Services
Querying Socrata for Boston Crimes
• https://data.cityofboston.gov/resource/29yf-ye7n.json?
$where=occurred_on_date>=“2016-08-23”
AND occurred_on_date<“2016-08-24”
• Then run it every day…
@rajrsinghIBM Cloud Data Services
Boston crime data query response
@rajrsinghIBM Cloud Data Services
Crime reconciliation
• CDSNV: non-violent• CDSDV: domestic
violence• CDSSTREET: street
crime
@rajrsinghIBM Cloud Data Services
DataProducts & Offerings
By Patrick Denker from Athens, GA - DSC04878, CC BY 2.0, https://commons.wikimedia.org/w/index.php?curid=37301184
@rajrsinghIBM Cloud Data Services
REST API & Mapping
@rajrsinghIBM Cloud Data Services
Cloudant / CouchDB replication
@rajrsinghIBM Cloud Data Services
Then this happened…
@rajrsinghIBM Cloud Data Services
The danger zone
@rajrsinghIBM Cloud Data Services
Safety app architecture
1.Built using Ionic framework
2.Cloudant -> mobile replication
3.Safety rating decision
4.Notification
https://github.com/ibm-cds-labs/crionic | by Jason Smith
@rajrsinghIBM Cloud Data Services
Safety app phase 2
• Add Census demographics• Population: crimes per capita• Housing quality
• Add Points of Interest• Commercial activity: busy areas are safer
IBM Cloud Data Services
Raj SinghDeveloper Advocate: Geo | Open [email protected] http://ibm.biz/rajrsingh
Twitter: @rajrsinghLinkedIn: rajrsingh
Thanks• REST API
• http://ibm.biz/opencrimes
• Crime code reconciliation tables• https://github.com/ibm-cds-labs/open-data/tree/master/crime
• Harvesting service code• https://github.com/ibm-cds-labs/crimeharvest
• IBM Cloud Data Services on GitHub• https://ibm-cds-labs.github.io/
• IBM Cloud Data Services on Bluemix• http://www.ibm.com/cloud-computing/bluemix/solutions/data-analytics/