Optimizing location-based apps with open data

21
IBM Cloud Data Services Optimizing Location Based Apps with Open Data Raj Singh, PhD Developer Advocate: Geo | Open Data [email protected] http://ibm.biz/ rajrsingh twitter: @rajrsingh

Transcript of Optimizing location-based apps with open data

Page 1: Optimizing location-based apps with open data

IBM Cloud Data Services

Optimizing Location Based Appswith Open DataRaj Singh, PhDDeveloper Advocate: Geo | Open [email protected]://ibm.biz/rajrsingh twitter: @rajrsingh

Page 2: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Read my newsletter on open data!http://opendatamag.rajsingh.org

My background

Developer Advocate, Geo + open dataIBM Analytics

MCP, Ph.D.Urban Studies & Planning

Crime data blog hot off the presseshttps://developer.ibm.com/clouddataservices/2016/11/03/open-crime-data

Page 3: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Agenda

• Finding and harvesting open crime data• Data wrangling & schema reconciliation• Products

• data service• safety app

Page 4: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Architecture

Page 5: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Harvesting CrimeData

Page 6: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Open data is on the rise

open data?

Technology maturity curve

Page 7: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Where to find open dataUS• http://us-city.census.okfn.org

UK crime data:• https://data.police.uk/data/

Europe• https://data.europa.eu/euodp/en/

data • https://www.europeandataportal.eu/

Page 8: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

The Socrata API

Page 9: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

DataWrangling

Gaucho Data Wrangler. Picture by Dave Werkley, http://compendiumofcountries.org/wiki/index.php?title=File:Data_Wrangler_-_Gaucho.png

Page 10: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Data wrangling crime codes

Page 11: Optimizing location-based apps with open data

@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…

Page 12: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Boston crime data query response

Page 13: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Crime reconciliation

• CDSNV: non-violent• CDSDV: domestic

violence• CDSSTREET: street

crime

Page 14: Optimizing location-based apps with open data

@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

Page 15: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

REST API & Mapping

Page 16: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Cloudant / CouchDB replication

Warning:Cloudant Free tier only supports 1Gb of data

Page 17: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

Then this happened…

Page 18: Optimizing location-based apps with open data

@rajrsinghIBM Cloud Data Services

The danger zone

Page 19: Optimizing location-based apps with open data

@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

Page 20: Optimizing location-based apps with open data

@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

Page 21: Optimizing location-based apps with open data

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 demos• http://crimedemos.mybluemix.net/crimebrowser• http://crimedemos.mybluemix.net

• 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 Bluemix• http://www.ibm.com/cloud-computing/bluemix/solutions/data-analytics/